]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: If command was successful don't store the command as an error
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 25 Oct 2018 01:03:18 +0000 (21:03 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 25 Oct 2018 01:03:18 +0000 (21:03 -0400)
The CMD_SUCCESS_DAEMON case should be excluded from storing the command line
that we think failed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
lib/command.c

index 839c37b10272f98067402ff1d5b8d63e32c27c7f..127e1a0a0ad2a82e2016f4eba20b919b4871921c 100644 (file)
@@ -1323,7 +1323,9 @@ int command_config_read_one_line(struct vty *vty,
                }
        }
 
-       if (ret != CMD_SUCCESS && ret != CMD_WARNING) {
+       if (ret != CMD_SUCCESS &&
+           ret != CMD_WARNING &&
+           ret != CMD_SUCCESS_DAEMON) {
                struct vty_error *ve = XCALLOC(MTYPE_TMP, sizeof(*ve));
 
                memcpy(ve->error_buf, vty->buf, VTY_BUFSIZ);