another attempt at a fix on connect_serverlist()...
authorLuke Leighton <lkcl@samba.org>
Mon, 30 Nov 1998 16:00:27 +0000 (16:00 +0000)
committerLuke Leighton <lkcl@samba.org>
Mon, 30 Nov 1998 16:00:27 +0000 (16:00 +0000)
source/libsmb/clientgen.c

index fc0df84d4acf49c7311b1dc4069f3e60f3fa63f2..5f6408bad184b2fde385f592aaf4ea3c9d318a10 100644 (file)
@@ -2727,14 +2727,6 @@ BOOL cli_connect_serverlist(struct cli_state *cli, char *p)
        struct nmb_name calling, called;
        BOOL connected_ok = False;
 
-       ZERO_STRUCTP(cli);
-
-       if (!cli_initialise(cli))
-       {
-               DEBUG(0,("cli_connect_serverlist: unable to initialize client connection.\n"));
-               return False;
-       }
-
        /*
        * Treat each name in the 'password server =' line as a potential
        * PDC/BDC. Contact each in turn and try and authenticate.
@@ -2742,6 +2734,14 @@ BOOL cli_connect_serverlist(struct cli_state *cli, char *p)
 
        while(p && next_token(&p,remote_machine,LIST_SEP,sizeof(remote_machine)))
        {
+               ZERO_STRUCTP(cli);
+
+               if (!cli_initialise(cli))
+               {
+                       DEBUG(0,("cli_connect_serverlist: unable to initialize client connection.\n"));
+                       return False;
+               }
+
                standard_sub_basic(remote_machine);
                strupper(remote_machine);