diff options
author | Andrew Tridgell <tridge@samba.org> | 1996-08-22 06:32:03 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1996-08-22 06:32:03 +0000 |
commit | 5c3e8326cc45d3cbd076475e445ce461a2bf7560 (patch) | |
tree | 0ca50dc20b40cdcd2ffb014ef0b80cf96a678fc4 /source/nmbd | |
parent | ef3f5e57ae5091a66e73cfad2d0da2684cfac3db (diff) | |
download | samba-5c3e8326cc45d3cbd076475e445ce461a2bf7560.tar.gz samba-5c3e8326cc45d3cbd076475e445ce461a2bf7560.tar.xz samba-5c3e8326cc45d3cbd076475e445ce461a2bf7560.zip |
- add timeouts to connect() for password server connections. This
makes multiple password servers practical.
Diffstat (limited to 'source/nmbd')
-rw-r--r-- | source/nmbd/nmbd.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source/nmbd/nmbd.c b/source/nmbd/nmbd.c index 097e4f794a5..5b3fd19491d 100644 --- a/source/nmbd/nmbd.c +++ b/source/nmbd/nmbd.c @@ -357,17 +357,22 @@ static BOOL open_sockets(BOOL isdaemon, int port) ****************************************************************************/ static BOOL init_structs() { - if (!get_myname(myhostname,NULL)) - return(False); + extern fstring local_machine; + char *p; if (! *myname) { - char *p; strcpy(myname,myhostname); p = strchr(myname,'.'); if (p) *p = 0; } strupper(myname); + strcpy(local_machine,myname); + trim_string(local_machine," "," "); + p = strchr(local_machine,' '); + if (p) *p = 0; + strlower(local_machine); + return True; } @@ -479,11 +484,15 @@ static void usage(char *pname) DEBUG(1,("%s netbios nameserver version %s started\n",timestring(),VERSION)); DEBUG(1,("Copyright Andrew Tridgell 1994\n")); + get_myname(myhostname,NULL); + if (!reload_services(False)) return(-1); init_structs(); + reload_services(True); + set_samba_nb_type(); if (!is_daemon && !is_a_socket(0)) { |