diff options
author | Chris Hall <GMCH@hestia.halldom.com> | 2010-01-31 18:41:22 +0000 |
---|---|---|
committer | Chris Hall <GMCH@hestia.halldom.com> | 2010-01-31 18:41:22 +0000 |
commit | 64b08a2d2ec89e5464d7489f239a5b23a7a0c17b (patch) | |
tree | a95f5c4c449735a51dcfb49c880e7a8c023cb9cf /lib/log.c | |
parent | abf662dd4bf9d688826378677f14f4b20d07d107 (diff) | |
download | quagga-64b08a2d2ec89e5464d7489f239a5b23a7a0c17b.tar.bz2 quagga-64b08a2d2ec89e5464d7489f239a5b23a7a0c17b.tar.xz |
Testing and fixing round.
modified: bgpd/bgp_msg_read.c -- fix to accept updates when
sEstablished !
modified: bgpd/bgp_packet.c -- modified XON/XOFF handling
modified: bgpd/bgp_peer.c -- fix event handling to discard
events when sLimping.
modified: bgpd/bgp_route.c -- announce routes when sEstablished
modified: bgpd/bgp_session.c -- add XOFF test
free stream in update_receive
when mqb_destroy
modified: bgpd/bgp_session.h -- add XOFF threshold & XOFF test
modified: bgpd/bgpd.c -- PRO TEM reenable in bgp_clear
for max-prefix handling
modified: lib/log.c -- fix zlog_backtrace
modified: lib/mqueue.c -- dasserts for mqb_free_count
Diffstat (limited to 'lib/log.c')
-rw-r--r-- | lib/log.c | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -19,7 +19,7 @@ * You should have received a copy of the GNU General Public License * along with GNU Zebra; see the file COPYING. If not, write to the Free * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 02111-1307, USA. */ #include <zebra.h> @@ -58,7 +58,7 @@ static int logfile_fd = -1; /* Used in signal handler. */ struct zlog *zlog_default = NULL; -const char *zlog_proto_names[] = +const char *zlog_proto_names[] = { "NONE", "DEFAULT", @@ -178,7 +178,7 @@ time_print(FILE *fp, struct timestamp_control *ctl) } fprintf(fp, "%s ", ctl->buf); } - + /* va_list version of zlog. */ static void vzlog (struct zlog *zl, int priority, const char *format, va_list args) @@ -187,7 +187,7 @@ vzlog (struct zlog *zl, int priority, const char *format, va_list args) uvzlog(zl, priority, format, args); UNLOCK } - + /* va_list version of zlog. Unprotected assumes mutex already held*/ static void uvzlog (struct zlog *zl, int priority, const char *format, va_list args) @@ -540,7 +540,7 @@ zlog_backtrace_sigsafe(int priority, void *program_counter) for (i = 0; i < size; i++) { s = buf; - if (bt) + if (bt) s = str_append(LOC, bt[i]); else { s = str_append(LOC,"[bt "); @@ -567,7 +567,7 @@ void zlog_backtrace(int priority) { LOCK - zlog_backtrace(priority); + uzlog_backtrace(priority); UNLOCK } @@ -738,7 +738,7 @@ zlog_abort (const char *mess) abort(); } - + /* Open log stream */ struct zlog * openzlog (const char *progname, zlog_proto_t protocol, @@ -761,7 +761,7 @@ openzlog (const char *progname, zlog_proto_t protocol, zl->default_lvl = LOG_DEBUG; openlog (progname, syslog_flags, zl->facility); - + return zl; } @@ -1187,15 +1187,15 @@ lookup (const struct message *mes, int key) { const struct message *pnt; - for (pnt = mes; pnt->key != 0; pnt++) - if (pnt->key == key) + for (pnt = mes; pnt->key != 0; pnt++) + if (pnt->key == key) return pnt->str; return ""; } /* Older/faster version of message lookup function, but requires caller to pass - * in the array size (instead of relying on a 0 key to terminate the search). + * in the array size (instead of relying on a 0 key to terminate the search). * * The return value is the message string if found, or the 'none' pointer * provided otherwise. @@ -1204,7 +1204,7 @@ const char * mes_lookup (const struct message *meslist, int max, int index, const char *none) { int pos = index - meslist[0].key; - + /* first check for best case: index is in range and matches the key * value in that slot. * NB: key numbering might be offset from 0. E.g. protocol constants @@ -1223,7 +1223,7 @@ mes_lookup (const struct message *meslist, int max, int index, const char *none) if (meslist->key == index) { const char *str = (meslist->str ? meslist->str : none); - + zlog_debug ("message index %d [%s] found in position %d (max is %d)", index, str, i, max); return str; |