From: Christopher R. Hertel Date: Thu, 22 Oct 1998 00:30:41 +0000 (+0000) Subject: Another cosmetic change. X-Git-Tag: samba-4.0.0alpha6~801^2~21415 X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=2356f467d129305246b4ba08e61a854f832a76ca Another cosmetic change. When dumping the wins.dat, this module will also write the database contents to the log file (don't do this if you have a large wins.dat!). The output was in a sort of tabular format, except that the asctime() function was used and it always terminates its output with a newline. I did a bit of fussing, removed the '\n' character, and did my best to line up the other columns. If the output format of asctime() is different on different systems, then the columns won't line up, but the output will still look better than it did before. Chris -)----- (This used to be commit 57295113feefcde77b429c661878444cd078b21f) --- diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c index 80825579c42..5dc350152f7 100644 --- a/source3/nmbd/nmbd_winsserver.c +++ b/source3/nmbd/nmbd_winsserver.c @@ -1580,11 +1580,17 @@ void wins_write_database(BOOL background) if( namerec->data.death_time != PERMANENT_TTL ) { + char *ts, *nl; + tm = LocalTime(&namerec->data.death_time); - DEBUGADD(4,("TTL = %s", asctime(tm) )); + ts = asctime(tm); + nl = strrchr( ts, '\n' ); + if( NULL != nl ) + *nl = '\0'; + DEBUGADD(4,("TTL = %s ", ts )); } else - DEBUGADD(4,("TTL = PERMANENT\t")); + DEBUGADD(4,("TTL = PERMANENT ")); for (i = 0; i < namerec->data.num_ips; i++) DEBUGADD(4,("%15s ", inet_ntoa(namerec->data.ip[i]) ));