From 31c09de03c656b7309888dbbc5240c31ed81537e Mon Sep 17 00:00:00 2001 From: "Christopher R. Hertel" Date: Mon, 3 Aug 1998 22:10:53 +0000 Subject: More formatting changes. Mostly converted some DEBUG() calls to DEBUGADD() so that we wouldn't get too many timestamps. Chris -)----- (This used to be commit 3e7e5fad378cf144927d9f2ffc82f80e150d44ab) --- source3/nmbd/nmbd.c | 2 +- source3/nmbd/nmbd_winsserver.c | 10 +++++----- source3/nmbd/nmbd_workgroupdb.c | 24 ++++++++++++++++-------- 3 files changed, 22 insertions(+), 14 deletions(-) (limited to 'source3/nmbd') diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c index af12911e7e..567f7bbca7 100644 --- a/source3/nmbd/nmbd.c +++ b/source3/nmbd/nmbd.c @@ -515,7 +515,7 @@ static BOOL init_structs(void) DEBUG( 5, ("Netbios name list:-\n") ); for( n=0; my_netbios_names[n]; n++ ) - DEBUG( 5, ( "my_netbios_names[%d]=\"%s\"\n", n, my_netbios_names[n] ) ); + DEBUGADD( 5, ( "my_netbios_names[%d]=\"%s\"\n", n, my_netbios_names[n] ) ); return( True ); } /* init_structs */ diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c index f663362706..dfa52a65f8 100644 --- a/source3/nmbd/nmbd_winsserver.c +++ b/source3/nmbd/nmbd_winsserver.c @@ -1570,19 +1570,19 @@ void wins_write_database(void) int i; struct tm *tm; - DEBUG(4,("%-19s ", namestr(&namerec->name) )); + DEBUGADD(4,("%-19s ", namestr(&namerec->name) )); if( namerec->data.death_time != PERMANENT_TTL ) { tm = LocalTime(&namerec->data.death_time); - DEBUG(4,("TTL = %s", asctime(tm) )); + DEBUGADD(4,("TTL = %s", asctime(tm) )); } else - DEBUG(4,("TTL = PERMANENT\t")); + DEBUGADD(4,("TTL = PERMANENT\t")); for (i = 0; i < namerec->data.num_ips; i++) - DEBUG(4,("%15s ", inet_ntoa(namerec->data.ip[i]) )); - DEBUG(4,("%2x\n", namerec->data.nb_flags )); + DEBUGADD(4,("%15s ", inet_ntoa(namerec->data.ip[i]) )); + DEBUGADD(4,("%2x\n", namerec->data.nb_flags )); if( namerec->data.source == REGISTER_NAME ) { diff --git a/source3/nmbd/nmbd_workgroupdb.c b/source3/nmbd/nmbd_workgroupdb.c index 51b2519d83..0b0b724854 100644 --- a/source3/nmbd/nmbd_workgroupdb.c +++ b/source3/nmbd/nmbd_workgroupdb.c @@ -303,22 +303,30 @@ void dump_workgroups(BOOL force_write) if (subrec->workgrouplist) { struct work_record *work; - - DEBUG(debuglevel,("dump_workgroups: dump workgroup on subnet %15s: ", subrec->subnet_name)); - DEBUG(debuglevel,(" netmask=%15s:\n", inet_ntoa(subrec->mask_ip))); + + if( DEBUGLVL( debuglevel ) ) + { + dbgtext( "dump_workgroups()\n " ); + dbgtext( "dump workgroup on subnet %15s: ", subrec->subnet_name ); + dbgtext( "netmask=%15s:\n", inet_ntoa(subrec->mask_ip) ); + } for (work = subrec->workgrouplist; work; work = work->next) { - DEBUG(debuglevel,("\t%s(%d) current master browser = %s\n", work->work_group, - work->token, - *work->local_master_browser_name ? work->local_master_browser_name : "UNKNOWN" )); + DEBUGADD( debuglevel, ( "\t%s(%d) current master browser = %s\n", + work->work_group, + work->token, + *work->local_master_browser_name + ? work->local_master_browser_name : "UNKNOWN" ) ); if (work->serverlist) { struct server_record *servrec; for (servrec = work->serverlist; servrec; servrec = servrec->next) { - DEBUG(debuglevel,("\t\t%s %8x (%s)\n", - servrec->serv.name, servrec->serv.type, servrec->serv.comment)); + DEBUGADD( debuglevel, ( "\t\t%s %8x (%s)\n", + servrec->serv.name, + servrec->serv.type, + servrec->serv.comment ) ); } } } -- cgit