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 --- functions.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
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; }