s3:libsmb: avoid using smb_flg2 in cli_trans.c
authorStefan Metzmacher <metze@samba.org>
Wed, 26 Oct 2011 13:46:33 +0000 (15:46 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 26 Oct 2011 14:18:28 +0000 (16:18 +0200)
metze

source3/libsmb/clitrans.c

index 1e98fc6d5d9a8d5ad318f3cfd3eff103fe74d4c9..97e39b32504edb3c70a8839dfbdae21bc278aa9e 100644 (file)
@@ -490,6 +490,7 @@ static void cli_trans_done(struct tevent_req *subreq)
                req, struct cli_trans_state);
        NTSTATUS status;
        bool sent_all;
+       const uint8_t *inhdr;
        uint8_t wct;
        uint16_t *vwv;
        uint32_t num_bytes;
@@ -521,6 +522,7 @@ static void cli_trans_done(struct tevent_req *subreq)
        if (NT_STATUS_IS_ERR(status)) {
                goto fail;
        }
+       inhdr = inbuf + NBT_HDR_SIZE;
 
        sent_all = ((state->param_sent == state->num_param)
                    && (state->data_sent == state->num_data));
@@ -579,7 +581,7 @@ static void cli_trans_done(struct tevent_req *subreq)
 
        if ((state->rparam.total == state->rparam.received)
            && (state->rdata.total == state->rdata.received)) {
-               state->recv_flags2 = SVAL(inbuf, smb_flg2);
+               state->recv_flags2 = SVAL(inhdr, HDR_FLG2);
                cli_trans_cleanup_primary(state);
                tevent_req_done(req);
                return;