smbXcli: set message id to UINT64_MAX for BREAK in smb2cli_req_create()
authorStefan Metzmacher <metze@samba.org>
Thu, 22 Sep 2011 19:24:42 +0000 (21:24 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 24 Nov 2011 18:02:30 +0000 (19:02 +0100)
This way the caller can register an oplock handler.

Note that smb2cli_req_compound_submit() will overwrite this
if a request is send over the wire.

metze

libcli/smb/smbXcli_base.c

index ebbbf72880a7349de9c803bbb7262aed2cd097b1..ed5f5a5776ea0dcbf018521df723c9a7fe56fc55 100644 (file)
@@ -1665,6 +1665,15 @@ struct tevent_req *smb2cli_req_create(TALLOC_CTX *mem_ctx,
        case SMB2_OP_CANCEL:
                state->one_way = true;
                break;
+       case SMB2_OP_BREAK:
+               /*
+                * If this is a dummy request, it will have
+                * UINT64_MAX as message id.
+                * If we send on break acknowledgement,
+                * this gets overwritten later.
+                */
+               SBVAL(state->smb2.hdr, SMB2_HDR_MESSAGE_ID, UINT64_MAX);
+               break;
        }
 
        if (timeout_msec > 0) {