Great cleanup of debug messages. LOCAL_DEBUG turned off in most modules,

several debug() calls converted to DBG().
This commit is contained in:
Martin Mares 2000-03-12 21:01:38 +00:00
parent 6a9f28b0b9
commit 6b9fa32080
11 changed files with 30 additions and 26 deletions

View file

@ -9,7 +9,7 @@
#include <setjmp.h> #include <setjmp.h>
#include <stdarg.h> #include <stdarg.h>
#define LOCAL_DEBUG #undef LOCAL_DEBUG
#include "nest/bird.h" #include "nest/bird.h"
#include "nest/route.h" #include "nest/route.h"

View file

@ -9,6 +9,8 @@
* *
*/ */
#undef LOCAL_DEBUG
#include <stdio.h> #include <stdio.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h> #include <unistd.h>
@ -525,7 +527,7 @@ f_run(struct filter *filter, struct rte **rte, struct ea_list **tmp_attrs, struc
{ {
struct f_inst *inst; struct f_inst *inst;
struct f_val res; struct f_val res;
debug( "Running filter `%s'...", filter->name ); DBG( "Running filter `%s'...", filter->name );
f_tmp_attrs = tmp_attrs; f_tmp_attrs = tmp_attrs;
f_rte = rte; f_rte = rte;
@ -535,7 +537,7 @@ f_run(struct filter *filter, struct rte **rte, struct ea_list **tmp_attrs, struc
res = interpret(inst); res = interpret(inst);
if (res.type != T_RETURN) if (res.type != T_RETURN)
return F_ERROR; return F_ERROR;
debug( "done (%d)\n", res.val.i ); DBG( "done (%d)\n", res.val.i );
return res.val.i; return res.val.i;
} }

View file

@ -426,7 +426,7 @@ auto_router_id(void)
j = i; j = i;
if (!j) if (!j)
die("Cannot determine router ID (no suitable network interface found), please configure it manually"); die("Cannot determine router ID (no suitable network interface found), please configure it manually");
log(L_INFO, "Guessed router ID %I according to interface %s", j->addr->ip, j->name); log(L_INFO "Guessed router ID %I according to interface %s", j->addr->ip, j->name);
config->router_id = ipa_to_u32(j->addr->ip); config->router_id = ipa_to_u32(j->addr->ip);
#endif #endif
} }

View file

@ -6,7 +6,7 @@
* Can be freely distributed and used under the terms of the GNU GPL. * Can be freely distributed and used under the terms of the GNU GPL.
*/ */
#define LOCAL_DEBUG #undef LOCAL_DEBUG
#include "nest/bird.h" #include "nest/bird.h"
#include "nest/iface.h" #include "nest/iface.h"

View file

@ -6,7 +6,7 @@
* Can be freely distributed and used under the terms of the GNU GPL. * Can be freely distributed and used under the terms of the GNU GPL.
*/ */
#define LOCAL_DEBUG #undef LOCAL_DEBUG
#include <string.h> #include <string.h>
@ -157,15 +157,15 @@ protos_preconfig(struct config *c)
struct protocol *p; struct protocol *p;
init_list(&c->protos); init_list(&c->protos);
debug("Protocol preconfig:"); DBG("Protocol preconfig:");
WALK_LIST(p, protocol_list) WALK_LIST(p, protocol_list)
{ {
debug(" %s", p->name); DBG(" %s", p->name);
p->name_counter = 0; p->name_counter = 0;
if (p->preconfig) if (p->preconfig)
p->preconfig(p, c); p->preconfig(p, c);
} }
debug("\n"); DBG("\n");
} }
void void
@ -174,15 +174,15 @@ protos_postconfig(struct config *c)
struct proto_config *x; struct proto_config *x;
struct protocol *p; struct protocol *p;
debug("Protocol postconfig:"); DBG("Protocol postconfig:");
WALK_LIST(x, c->protos) WALK_LIST(x, c->protos)
{ {
debug(" %s", x->name); DBG(" %s", x->name);
p = x->protocol; p = x->protocol;
if (p->postconfig) if (p->postconfig)
p->postconfig(x); p->postconfig(x);
} }
debug("\n"); DBG("\n");
} }
static struct proto * static struct proto *

View file

@ -6,7 +6,7 @@
* Can be freely distributed and used under the terms of the GNU GPL. * Can be freely distributed and used under the terms of the GNU GPL.
*/ */
#define LOCAL_DEBUG #undef LOCAL_DEBUG
#include <string.h> #include <string.h>
@ -35,7 +35,7 @@ dev_ifa_notify(struct proto *p, unsigned c, struct ifa *ad)
n = net_find(p->table, ad->prefix, ad->pxlen); n = net_find(p->table, ad->prefix, ad->pxlen);
if (!n) if (!n)
{ {
debug("dev_if_notify: device shutdown: prefix not found\n"); DBG("dev_if_notify: device shutdown: prefix not found\n");
return; return;
} }
rte_update(p->table, n, p, NULL); rte_update(p->table, n, p, NULL);
@ -46,7 +46,7 @@ dev_ifa_notify(struct proto *p, unsigned c, struct ifa *ad)
net *n; net *n;
rte *e; rte *e;
debug("dev_if_notify: %s:%I going up\n", ad->iface->name, ad->ip); DBG("dev_if_notify: %s:%I going up\n", ad->iface->name, ad->ip);
bzero(&A, sizeof(A)); bzero(&A, sizeof(A));
A.proto = p; A.proto = p;
A.source = RTS_DEVICE; A.source = RTS_DEVICE;

View file

@ -6,7 +6,7 @@
* Can be freely distributed and used under the terms of the GNU GPL. * Can be freely distributed and used under the terms of the GNU GPL.
*/ */
#define LOCAL_DEBUG #undef LOCAL_DEBUG
#include <string.h> #include <string.h>

View file

@ -8,7 +8,7 @@
#include <string.h> #include <string.h>
#define LOCAL_DEBUG #undef LOCAL_DEBUG
#include "nest/bird.h" #include "nest/bird.h"
#include "nest/route.h" #include "nest/route.h"
@ -196,7 +196,7 @@ rt_feed_baby(struct proto *p)
if (!p->ahooks) if (!p->ahooks)
return; return;
debug("Announcing routes to new protocol %s\n", p->name); DBG("Announcing routes to new protocol %s\n", p->name);
for(h=p->ahooks; h; h=h->next) for(h=p->ahooks; h; h=h->next)
{ {
rtable *t = h->table; rtable *t = h->table;

View file

@ -6,7 +6,7 @@
* Can be freely distributed and used under the terms of the GNU GPL. * Can be freely distributed and used under the terms of the GNU GPL.
*/ */
#define LOCAL_DEBUG #undef LOCAL_DEBUG
#include "nest/bird.h" #include "nest/bird.h"
#include "nest/iface.h" #include "nest/iface.h"

View file

@ -6,7 +6,7 @@
* Can be freely distributed and used under the terms of the GNU GPL. * Can be freely distributed and used under the terms of the GNU GPL.
*/ */
#define LOCAL_DEBUG #undef LOCAL_DEBUG
#include <string.h> #include <string.h>

View file

@ -6,6 +6,8 @@
* Can be freely distributed and used under the terms of the GNU GPL. * Can be freely distributed and used under the terms of the GNU GPL.
*/ */
#define LOCAL_DEBUG
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
@ -275,7 +277,7 @@ cli_init_unix(void)
void void
async_shutdown(void) async_shutdown(void)
{ {
debug("Shutting down...\n"); DBG("Shutting down...\n");
order_shutdown(); order_shutdown();
} }
@ -293,21 +295,21 @@ sysdep_shutdown_done(void)
static void static void
handle_sighup(int sig) handle_sighup(int sig)
{ {
debug("Caught SIGHUP...\n"); DBG("Caught SIGHUP...\n");
async_config_flag = 1; async_config_flag = 1;
} }
static void static void
handle_sigusr(int sig) handle_sigusr(int sig)
{ {
debug("Caught SIGUSR...\n"); DBG("Caught SIGUSR...\n");
async_dump_flag = 1; async_dump_flag = 1;
} }
static void static void
handle_sigterm(int sig) handle_sigterm(int sig)
{ {
debug("Caught SIGTERM...\n"); DBG("Caught SIGTERM...\n");
async_shutdown_flag = 1; async_shutdown_flag = 1;
} }
@ -392,7 +394,7 @@ main(int argc, char **argv)
log(L_INFO "Launching BIRD " BIRD_VERSION "..."); log(L_INFO "Launching BIRD " BIRD_VERSION "...");
debug("Initializing.\n"); DBG("Initializing.\n");
resource_init(); resource_init();
olock_init(); olock_init();
io_init(); io_init();
@ -412,7 +414,7 @@ main(int argc, char **argv)
ev_run_list(&global_event_list); ev_run_list(&global_event_list);
async_dump(); async_dump();
debug("Entering I/O loop.\n"); DBG("Entering I/O loop.\n");
io_loop(); io_loop();
bug("I/O loop died"); bug("I/O loop died");