r6225: get rid of warnings from my compiler about nested externs
[gd/samba/.git] / source / nmbd / nmbd.c
index 36aa2e2485662e07fc7547aba82239110eaacd3d..532b578f3c79b8937775c49a6da42394f643d8a3 100644 (file)
@@ -27,8 +27,12 @@ int ClientNMB       = -1;
 int ClientDGRAM     = -1;
 int global_nmb_port = -1;
 
+extern BOOL rescan_listen_set;
+extern struct in_addr loopback_ip;
 extern BOOL global_in_nmbd;
 
+extern BOOL override_logfile;
+
 /* are we running as a daemon ? */
 static BOOL is_daemon;
 
@@ -194,8 +198,6 @@ static BOOL reload_interfaces(time_t t)
        static time_t lastt;
        int n;
        struct subnet_record *subrec;
-       extern BOOL rescan_listen_set;
-       extern struct in_addr loopback_ip;
 
        if (t && ((t - lastt) < NMBD_INTERFACES_RELOAD)) return False;
        lastt = t;
@@ -623,8 +625,10 @@ static BOOL open_sockets(BOOL isdaemon, int port)
        
        sys_srandom(time(NULL) ^ sys_getpid());
        
-       slprintf(logfile, sizeof(logfile)-1, "%s/log.nmbd", dyn_LOGFILEBASE);
-       lp_set_logfile(logfile);
+       if (!override_logfile) {
+               slprintf(logfile, sizeof(logfile)-1, "%s/log.nmbd", dyn_LOGFILEBASE);
+               lp_set_logfile(logfile);
+       }
        
        fault_setup((void (*)(void *))fault_continue );
        
@@ -662,7 +666,7 @@ static BOOL open_sockets(BOOL isdaemon, int port)
        reopen_logs();
 
        DEBUG( 0, ( "Netbios nameserver version %s started.\n", SAMBA_VERSION_STRING) );
-       DEBUGADD( 0, ( "Copyright Andrew Tridgell and the Samba Team 1994-2003\n" ) );
+       DEBUGADD( 0, ( "Copyright Andrew Tridgell and the Samba Team 1994-2004\n" ) );
 
        if ( !reload_nmbd_services(False) )
                return(-1);