Author: marek Date: 2010-03-10 22:41:06 +0100 (Wed, 10 Mar 2010) New Revision: 1588
Modified: trunk/batctl/bat-hosts.c Log: batctl: don't warn when identical bat-host entries are found
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
Modified: trunk/batctl/bat-hosts.c =================================================================== --- trunk/batctl/bat-hosts.c 2010-03-10 21:18:38 UTC (rev 1587) +++ trunk/batctl/bat-hosts.c 2010-03-10 21:41:06 UTC (rev 1588) @@ -98,6 +98,10 @@
/* mac entry already exists - we found a new name for it */ if (bat_host) { + /* if the mac addresses and the names are the same we can safely ignore the entry */ + if (strcmp(bat_host->name, name) == 0) + continue; + fprintf(stderr, "Warning - mac already known (changing name from '%s' to '%s'): %s\n", bat_host->name, name, mac_str); strncpy(bat_host->name, name, HOST_NAME_MAX_LEN - 1);