summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher R. Hertel <crh@samba.org>1998-10-22 00:30:41 +0000
committerChristopher R. Hertel <crh@samba.org>1998-10-22 00:30:41 +0000
commit2356f467d129305246b4ba08e61a854f832a76ca (patch)
tree3ad0bae7126a6edbbeae1c62d00c96ea535e49e1
parenteadc5b8c6ecdd6892647d391e1976b2c708d1ea0 (diff)
downloadsamba-2356f467d129305246b4ba08e61a854f832a76ca.tar.gz
samba-2356f467d129305246b4ba08e61a854f832a76ca.tar.bz2
samba-2356f467d129305246b4ba08e61a854f832a76ca.zip
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)
-rw-r--r--source3/nmbd/nmbd_winsserver.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c
index 80825579c4..5dc350152f 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]) ));