SMB2-CONNECT: remove reference to req->session before calling smb2_logoff_recv()...
authorStefan Metzmacher <metze@samba.org>
Mon, 9 Jun 2008 19:41:55 +0000 (21:41 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 28 Jul 2008 12:09:45 +0000 (14:09 +0200)
metze

source/torture/smb2/connect.c

index 826bb2d7195575c0232520f4f42bfe47c0dd0f86..e77e32ff7a0cfcc83bdc18954d1faeec2e29aa9d 100644 (file)
@@ -193,6 +193,7 @@ bool torture_smb2_connect(struct torture_context *torture)
 {
        TALLOC_CTX *mem_ctx = talloc_new(NULL);
        struct smb2_tree *tree;
+       struct smb2_request *req;
        struct smb2_handle h1, h2;
        NTSTATUS status;
 
@@ -242,7 +243,15 @@ bool torture_smb2_connect(struct torture_context *torture)
                return false;
        }
 
-       status = smb2_logoff(tree->session);
+       req = smb2_logoff_send(tree->session);
+       if (!req) {
+               printf("smb2_logoff_send() failed\n");
+               return false;
+       }
+
+       req->session = NULL;
+
+       status = smb2_logoff_recv(req);
        if (!NT_STATUS_EQUAL(status, NT_STATUS_USER_SESSION_DELETED)) {
                printf("Logoff should have disabled session - %s\n", nt_errstr(status));
                return false;