]> git.puffer.fish Git - mirror/frr.git/commitdiff
[vtysh] suppress output in 'show logging' for daemons not present
authorPaul Jakma <paul.jakma@sun.com>
Tue, 23 May 2006 22:10:55 +0000 (22:10 +0000)
committerPaul Jakma <paul.jakma@sun.com>
Tue, 23 May 2006 22:10:55 +0000 (22:10 +0000)
2006-05-21 Paul Jakma <paul.jakma@sun.com>

* vtysh.c: (vtysh_show_logging_cmd) Suppress output for daemons
  which are not running (Andrew Schorr).

vtysh/ChangeLog
vtysh/vtysh.c

index e4908b456e7d64904c317e8bae88ae46f14a57c6..3ad1c252cb5ea46f7b935bf18551f0ec79eb6018 100644 (file)
@@ -1,3 +1,8 @@
+2006-05-21 Paul Jakma <paul.jakma@sun.com>
+
+       * vtysh.c: (vtysh_show_logging_cmd) Suppress output for daemons
+         which are not running (Andrew Schorr).
+
 2006-05-17 Paul Jakma <paul.jakma@sun.com>
 
        * vtysh.c: (general) Add 'show logging' command.
index a2115faef4c81c4277fb0c0d78d4db0612a3d5bc..2dbb53379c6e3fd3c83592d3844ed237945682a3 100644 (file)
@@ -1323,12 +1323,14 @@ DEFUN (vtysh_show_logging,
   char line[] = "show logging\n";
   
   for (i = 0; i < VTYSH_INDEX_MAX; i++)
-    {
-      fprintf (stdout,"Logging configuration for %s:\n", vtysh_client[i].name);
-      ret = vtysh_client_execute (&vtysh_client[i], line, stdout);
-      fprintf (stdout,"\n");
-    }
-        
+    if ( vtysh_client[i].fd >= 0 )
+      {
+        fprintf (stdout,"Logging configuration for %s:\n", 
+                 vtysh_client[i].name);
+        ret = vtysh_client_execute (&vtysh_client[i], line, stdout);
+        fprintf (stdout,"\n");
+      }
+  
   return ret;
 }