bug-zebra
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

minor fix: inconsistent logging state in zebra daemon


From: Arnold, Gilad
Subject: minor fix: inconsistent logging state in zebra daemon
Date: Tue, 28 May 2002 17:54:59 +0300

Hello list,

Minor problem with zebra daemon logging: It turns out that upon
initialization, the daemon appears to be not logging to stdout while it
is in fact doing so. Moreover, using "no log stdout" solves the problem
but cannot be written to zebra.conf (since it is the default behavior),
thus it will happen again when zebra is restarted.

I'm attaching a straight-forward fix for that; please let me know if
there's a particular reason why zebra daemon zlog is initialized with
ZLOG_STDOUT (unlike other Zebra daemons). Another minor fix does
explicit initialization to all members of 'struct host host' under
lib/command.c.

Fix is against CVS version from 2002-05-28.

Apologies for bugging... ;-)
Regards,
G.

---


Index: lib/command.c
===================================================================
RCS file: /cvsroot/zebra/lib/command.c,v
retrieving revision 1.110
diff -c -c -r1.110 command.c
*** lib/command.c       18 May 2002 04:05:48 -0000      1.110
--- lib/command.c       28 May 2002 14:51:15 -0000
***************
*** 2875,2885 ****
    cmdvec = vector_init (VECTOR_MIN_SIZE);
  
    /* Default host value settings. */
!   host.name = NULL;
!   host.password = NULL;
!   host.enable = NULL;
!   host.logfile = NULL;
!   host.config = NULL;
    host.lines = -1;
    host.motd = default_motd;
  
--- 2875,2881 ----
    cmdvec = vector_init (VECTOR_MIN_SIZE);
  
    /* Default host value settings. */
!   memset (&host, 0, sizeof host);
    host.lines = -1;
    host.motd = default_motd;
  
Index: zebra/main.c
===================================================================
RCS file: /cvsroot/zebra/zebra/main.c,v
retrieving revision 1.43
diff -c -c -r1.43 main.c
*** zebra/main.c        12 Jan 2002 11:08:06 -0000      1.43
--- zebra/main.c        28 May 2002 14:51:17 -0000
***************
*** 183,189 ****
    /* preserve my name */
    progname = ((p = strrchr (argv[0], '/')) ? ++p : argv[0]);
  
!   zlog_default = openzlog (progname, ZLOG_STDOUT, ZLOG_ZEBRA,
                           LOG_CONS|LOG_NDELAY|LOG_PID, LOG_DAEMON);
  
    while (1) 
--- 183,189 ----
    /* preserve my name */
    progname = ((p = strrchr (argv[0], '/')) ? ++p : argv[0]);
  
!   zlog_default = openzlog (progname, ZLOG_NOLOG, ZLOG_ZEBRA,
                           LOG_CONS|LOG_NDELAY|LOG_PID, LOG_DAEMON);
  
    while (1) 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]