On Tue, Dec 06, 2016 at 06:52:14PM -0600, Jafar Al-Gharaibeh wrote:
> I tested this patch with the latest sources and got a weird situation 
> where vtysh shell doesn't exit. "end", "exit", "quit" failed to make it 
> do so. I moved the #ifdef DEV_BUILD inside the if statement to cover 
> only the fprintf statement and that fixed it. The reason I think is that 
> the ifdef prevents an early bailout (return) that takes place in the 
> normal case. HEre is the code looks:

fix for patchwork:

diff --git a/lib/command.c b/lib/command.c
index ab46fc4a..bff86e58 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -638,9 +638,11 @@ install_element (enum node_type ntype, struct cmd_element 
*cmd)
   
   if (hash_lookup (cnode->cmd_hash, cmd) != NULL)
     {
+#ifdef DEV_BUILD
       fprintf (stderr, 
                "Multiple command installs to node %d of command:\n%s\n",
                ntype, cmd->string);
+#endif
       return;
     }
   

_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to