s3:libsmb: Attempt to fix bug 6665
authorVolker Lendecke <vl@samba.org>
Thu, 3 Sep 2009 07:18:10 +0000 (09:18 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 3 Sep 2009 07:23:57 +0000 (09:23 +0200)
Before the async libsmb rewrites, we sent tid==0 on negprot. With the rewrite,
we send 0xffff. This *should* not matter, but this is one difference in the
sniffs I see.

source3/libsmb/cliconnect.c

index 239dfc85f475643e11718e8c99998e7447c0f403..600f8d1b4adb422dee0ded90210971162f0d5f2e 100644 (file)
@@ -1607,6 +1607,7 @@ struct tevent_req *cli_negprot_send(TALLOC_CTX *mem_ctx,
        struct cli_negprot_state *state;
        uint8_t *bytes = NULL;
        int numprots;
+       uint16_t cnum;
 
        req = tevent_req_create(mem_ctx, &state, struct cli_negprot_state);
        if (req == NULL) {
@@ -1637,8 +1638,13 @@ struct tevent_req *cli_negprot_send(TALLOC_CTX *mem_ctx,
                }
        }
 
+       cnum = cli->cnum;
+
+       cli->cnum = 0;
        subreq = cli_smb_send(state, ev, cli, SMBnegprot, 0, 0, NULL,
                              talloc_get_size(bytes), bytes);
+       cli->cnum = cnum;
+
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
        }