summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/libsmb/cliconnect.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 239dfc85f4..600f8d1b4a 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -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);
}