smbXcli: add state->smb1.recv_{cmd,status,iov}
authorStefan Metzmacher <metze@samba.org>
Wed, 16 Nov 2011 10:11:18 +0000 (11:11 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 24 Nov 2011 18:02:30 +0000 (19:02 +0100)
In the following commits we will need to remember a few more things.

metze

libcli/smb/smbXcli_base.c

index 22bd34175eb1512b6e1821d0d0f498aee9c9ec4b..a48ef69aa743e358c2e504f7a1055da21466d5cf 100644 (file)
@@ -146,6 +146,11 @@ struct smbXcli_req_state {
                int chain_num;
                int chain_length;
                struct tevent_req **chained_requests;
+
+               uint8_t recv_cmd;
+               NTSTATUS recv_status;
+               /* always an array of 3 talloc elements */
+               struct iovec *recv_iov;
        } smb1;
 
        struct {
@@ -819,6 +824,14 @@ struct tevent_req *smb1cli_req_create(TALLOC_CTX *mem_ctx,
        state->ev = ev;
        state->conn = conn;
 
+       state->smb1.recv_cmd = 0xFF;
+       state->smb1.recv_status = NT_STATUS_INTERNAL_ERROR;
+       state->smb1.recv_iov = talloc_zero_array(state, struct iovec, 3);
+       if (state->smb1.recv_iov == NULL) {
+               TALLOC_FREE(req);
+               return NULL;
+       }
+
        smb1cli_req_flags(conn->protocol,
                          conn->smb1.capabilities,
                          smb_command,