summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1996-08-22 06:32:03 +0000
committerAndrew Tridgell <tridge@samba.org>1996-08-22 06:32:03 +0000
commit9155889092ac9ff476d950a0c1b624ebad3cdad6 (patch)
tree1b65edac5a195405ee1af46967c5c3e9726aeb38 /source3/nmbd/nmbd.c
parentcebbbffcae8d1fd1521b50010843b79959c08cef (diff)
downloadsamba-9155889092ac9ff476d950a0c1b624ebad3cdad6.tar.gz
samba-9155889092ac9ff476d950a0c1b624ebad3cdad6.tar.bz2
samba-9155889092ac9ff476d950a0c1b624ebad3cdad6.zip
- add timeouts to connect() for password server connections. This
makes multiple password servers practical. (This used to be commit 5c3e8326cc45d3cbd076475e445ce461a2bf7560)
Diffstat (limited to 'source3/nmbd/nmbd.c')
-rw-r--r--source3/nmbd/nmbd.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index 097e4f794a..5b3fd19491 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/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)) {