The branch, master has been updated
       via  5df8791 s3: Use cli_connect_nb in locktest
       via  6bf5d9a s3: Fix smbsock_connect
      from  9e05d34 s3: Fix a tiny memleak in copy_unix_token

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 5df87913d73ac3c3b6d1893f20038b24db31bd4f
Author: Volker Lendecke <[email protected]>
Date:   Sat May 28 18:57:03 2011 +0200

    s3: Use cli_connect_nb in locktest
    
    Autobuild-User: Volker Lendecke <[email protected]>
    Autobuild-Date: Sat May 28 18:06:49 CEST 2011 on sn-devel-104

commit 6bf5d9a61f241d21cf5980f3617c7e27469c4681
Author: Volker Lendecke <[email protected]>
Date:   Sat May 28 18:55:47 2011 +0200

    s3: Fix smbsock_connect
    
    If all connection attempts fail, return immediately. Plain bug.

-----------------------------------------------------------------------

Summary of changes:
 source3/libsmb/smbsock_connect.c |    2 +-
 source3/torture/locktest.c       |   31 +++----------------------------
 2 files changed, 4 insertions(+), 29 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/smbsock_connect.c b/source3/libsmb/smbsock_connect.c
index 88b4533..8cf403c 100644
--- a/source3/libsmb/smbsock_connect.c
+++ b/source3/libsmb/smbsock_connect.c
@@ -575,7 +575,7 @@ static void smbsock_any_connect_connected(struct tevent_req 
*subreq)
        }
 
        state->num_received += 1;
-       if (state->num_received <= state->num_addrs) {
+       if (state->num_received < state->num_addrs) {
                /*
                 * More addrs pending, wait for the others
                 */
diff --git a/source3/torture/locktest.c b/source3/torture/locktest.c
index 95e4975..38f05f1 100644
--- a/source3/torture/locktest.c
+++ b/source3/torture/locktest.c
@@ -164,10 +164,8 @@ return a connection to a server
 static struct cli_state *connect_one(char *share, int snum)
 {
        struct cli_state *c;
-       struct nmb_name called, calling;
        char *server_n;
        fstring server;
-       struct sockaddr_storage ss;
        fstring myname;
        static int count;
        NTSTATUS status;
@@ -180,42 +178,19 @@ static struct cli_state *connect_one(char *share, int 
snum)
 
        server_n = server;
 
-       zero_sockaddr(&ss);
-
        slprintf(myname,sizeof(myname), "lock-%lu-%u", (unsigned long)getpid(), 
count++);
 
-       make_nmb_name(&calling, myname, 0x0);
-       make_nmb_name(&called , server, 0x20);
-
- again:
-        zero_sockaddr(&ss);
-
        /* have to open a new connection */
-       if (!(c=cli_initialise())) {
-               DEBUG(0,("Connection to %s failed\n", server_n));
-               return NULL;
-       }
 
-       status = cli_connect(c, server_n, &ss);
+       status = cli_connect_nb(server_n, NULL, 0, myname, Undefined, &c);
        if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(0,("Connection to %s failed. Error %s\n", server_n, 
nt_errstr(status) ));
+               DEBUG(0, ("Connection to %s failed. Error %s\n", server_n,
+                         nt_errstr(status)));
                return NULL;
        }
 
        c->use_kerberos = use_kerberos;
 
-       if (!cli_session_request(c, &calling, &called)) {
-               DEBUG(0,("session request to %s failed\n", called.name));
-               cli_shutdown(c);
-               if (strcmp(called.name, "*SMBSERVER")) {
-                       make_nmb_name(&called , "*SMBSERVER", 0x20);
-                       goto again;
-               }
-               return NULL;
-       }
-
-       DEBUG(4,(" session request ok\n"));
-
        status = cli_negprot(c);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0, ("protocol negotiation failed: %s\n",


-- 
Samba Shared Repository

Reply via email to