More formatting changes. Mostly converted some DEBUG() calls to DEBUGADD()
authorChristopher R. Hertel <crh@samba.org>
Mon, 3 Aug 1998 22:10:53 +0000 (22:10 +0000)
committerChristopher R. Hertel <crh@samba.org>
Mon, 3 Aug 1998 22:10:53 +0000 (22:10 +0000)
so that we wouldn't get too many timestamps.

Chris -)-----
(This used to be commit 3e7e5fad378cf144927d9f2ffc82f80e150d44ab)

source3/lib/charset.c
source3/nmbd/nmbd.c
source3/nmbd/nmbd_winsserver.c
source3/nmbd/nmbd_workgroupdb.c
source3/param/loadparm.c

index db331af115d6c3384ce8031859aea5d3962f92c5..5e9481f9bbf41dcff66f15acd60dc346b53fd678 100644 (file)
@@ -127,9 +127,10 @@ static void add_dos_char(int lower, BOOL map_lower_to_upper,
 {
   lower &= 0xff;
   upper &= 0xff;
-  DEBUG(6,("Adding chars 0x%x 0x%x (l->u = %s) (u->l = %s)\n",lower,upper,
-         map_lower_to_upper ? "True" : "False",
-         map_upper_to_lower ? "True" : "False"));
+  DEBUGADD( 6, ( "Adding chars 0x%x 0x%x (l->u = %s) (u->l = %s)\n",
+                 lower, upper,
+                 map_lower_to_upper ? "True" : "False",
+                 map_upper_to_lower ? "True" : "False" ) );
   if (lower) dos_char_map[lower] = 1;
   if (upper) dos_char_map[upper] = 1;
   lower_char_map[lower] = (char)lower; /* Define tolower(lower) */
index af12911e7e70f5f9a6087172d12fc5dc341ef44e..567f7bbca767aab69b92135d46b3315497708c45 100644 (file)
@@ -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 */
index f663362706995aaa88481d598c5c689c3520f744..dfa52a65f81244354073678f25f923b71e005833 100644 (file)
@@ -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 )
     {
index 51b2519d837afca4b54c1ba9d9efcddef7d77496..0b0b72485473bc4b32624c94c8e1e4f1e6e9f8a7 100644 (file)
@@ -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 ) );
           }
         }
       }
index ce8ff7122decd51199991f0425845e88a78842a0..008f4e453902af2294a7075d7c1e03a68fc85453 100644 (file)
@@ -1710,17 +1710,17 @@ BOOL lp_file_list_changed(void)
     pstrcpy(n2,f->name);
     standard_sub_basic(n2);
 
-    DEBUG(6,("file %s -> %s  last mod_time: %s\n",
-             f->name, n2, ctime(&f->modtime)));
+    DEBUGADD( 6, ( "file %s -> %s  last mod_time: %s\n",
+                   f->name, n2, ctime(&f->modtime) ) );
 
     mod_time = file_modtime(n2);
 
     if (f->modtime != mod_time) {
-           DEBUG(6,("file %s modified: %s\n", n2, ctime(&mod_time)));
+           DEBUGADD(6,("file %s modified: %s\n", n2, ctime(&mod_time)));
            f->modtime = mod_time;
            return(True);
     }
-    f = f->next;   
+    f = f->next;
   }
   return(False);
 }