Another cosmetic change.
authorChristopher R. Hertel <crh@samba.org>
Thu, 22 Oct 1998 00:30:41 +0000 (00:30 +0000)
committerChristopher R. Hertel <crh@samba.org>
Thu, 22 Oct 1998 00:30:41 +0000 (00:30 +0000)
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)

source3/nmbd/nmbd_winsserver.c

index 80825579c4279661a1556ee51381611ec3c8cf45..5dc350152f7f62c49c9f2dd73e2e9ce30d955993 100644 (file)
@@ -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]) ));