The following commit has been merged in the master branch: commit 89cce17cef76894b391078a8b3a5a80eb59328cb Author: Linus Lüssing linus.luessing@ascom.ch Date: Sun Nov 28 16:17:15 2010 +0100
batctl: Fix skipped substitutions of mac addresses with a following ', '
When batctl does not find a matching name for a given mac address in the bat-hosts file, then it unfortunately removes the following ',' instead of leaving the string unmodified. batctl bisect is then not able to find the mac address anymore. This commit fixes this issue.
Signed-off-by: Linus Lüssing linus.luessing@ascom.ch
diff --git a/functions.c b/functions.c index ce046ba..9b1e22b 100644 --- a/functions.c +++ b/functions.c @@ -201,16 +201,16 @@ read: /* keep table format */ printf("%17s", bat_host->name);
- if (extra_char != '\0') - printf("%c", extra_char); - - printf(" "); goto written;
print_plain_buff: - printf("%s ", buff_ptr); + printf("%s", buff_ptr);
written: + if (extra_char != '\0') + printf("%c", extra_char); + + printf(" "); buff_ptr = space_ptr + 1; }