Move setting the mid field in req->outbuf from _cork to _uncork
authorVolker Lendecke <vl@sernet.de>
Tue, 9 Sep 2008 12:39:45 +0000 (14:39 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 9 Sep 2008 15:37:34 +0000 (17:37 +0200)
The async trans calls need this, as for secondary trans calls they have to
modify the MID from what cli_request_chain() gave us.
(This used to be commit c85de4b7b5db8b54b8bf0f91acbd6d08d1b0bc9d)

source3/libsmb/async_smb.c

index c875acbe48fd2da3fedd13db7bf09cc087524c98..eedc7d4481db6d8713b9152fb9e5942068b7b34c 100644 (file)
@@ -437,7 +437,6 @@ bool cli_chain_cork(struct cli_state *cli, struct event_context *ev,
        cli_setup_packet_buf(cli, req->outbuf);
 
        req->mid = cli_new_mid(cli);
-       SSVAL(req->outbuf, smb_mid, req->mid);
 
        cli->chain_accumulator = req;
 
@@ -468,6 +467,7 @@ void cli_chain_uncork(struct cli_state *cli)
 
        cli->chain_accumulator = NULL;
 
+       SSVAL(req->outbuf, smb_mid, req->mid);
        smb_setlen(req->outbuf, talloc_get_size(req->outbuf) - 4);
 
        cli_calculate_sign_mac(cli, req->outbuf);