]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
lldpcli: don't complain when reading a commented line
authorVincent Bernat <vincent@bernat.im>
Tue, 14 Oct 2014 16:11:47 +0000 (18:11 +0200)
committerVincent Bernat <vincent@bernat.im>
Tue, 14 Oct 2014 16:11:47 +0000 (18:11 +0200)
Since we ship a default configuration file with only a comment, this was
annoying.

NEWS
src/client/lldpcli.c

diff --git a/NEWS b/NEWS
index e8a9008be6ba03c5e3be16db0c330fe6a909e9e0..094e729f2bd8194d6a5a9c8bd264cce280368da8 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+lldpd (0.7.12)
+  * Fix:
+    + Don't complain when parsing a commented line
+
 lldpd (0.7.11)
   * Features:
     + Ship bash and zsh completion.
index 8eeac70ed98c380b2e1f5b3e8b731f000628d58d..ef565c7191fc5c2228b9c207ddb77ade44e5fce9 100644 (file)
@@ -494,7 +494,8 @@ main(int argc, char *argv[])
                                line = strndup(line, len);
                                if (line[len - 1] == '\n') {
                                        line[len - 1] = '\0';
-                                       parse_and_exec(conn, fmt, line);
+                                       if (line[0] != '#')
+                                               parse_and_exec(conn, fmt, line);
                                }
                                free(line);
                        }