Fix a bunch of "unused variable" warnings.
[ira/wip.git] / source3 / smbd / smb2_create.c
index 6218592e3e7dc01231a3024adf865f627e8c530b..3e5b81d5c8d8891799d00c623cf3d63711d22212 100644 (file)
@@ -264,8 +264,6 @@ static void smbd_smb2_request_create_done(struct tevent_req *tsubreq)
 {
        struct smbd_smb2_request *smb2req = tevent_req_callback_data(tsubreq,
                                        struct smbd_smb2_request);
-       int i = smb2req->current_idx;
-       uint8_t *outhdr;
        DATA_BLOB outbody;
        DATA_BLOB outdyn;
        uint8_t out_oplock_level = 0;
@@ -337,8 +335,6 @@ static void smbd_smb2_request_create_done(struct tevent_req *tsubreq)
                out_context_buffer_offset = SMB2_HDR_BODY + 0x58;
        }
 
-       outhdr = (uint8_t *)smb2req->out.vector[i].iov_base;
-
        outbody = data_blob_talloc(smb2req->out.vector, NULL, 0x58);
        if (outbody.data == NULL) {
                error = smbd_smb2_request_error(smb2req, NT_STATUS_NO_MEMORY);
@@ -458,6 +454,7 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
                        return tevent_req_post(req, ev);
                }
                state->smb1req = smb1req;
+               smb2req->subreq = req;
                DEBUG(10,("smbd_smb2_create: name[%s]\n",
                        in_name));
        } else {
@@ -745,11 +742,6 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
 
                                status = smbd_calculate_access_mask(smb1req->conn,
                                                        result->fsp_name,
-                                                       /*
-                                                        * at this stage
-                                                        * it exists
-                                                        */
-                                                       true,
                                                        SEC_FLAG_MAXIMUM_ALLOWED,
                                                        &max_access_granted);
 
@@ -898,7 +890,7 @@ bool get_deferred_open_message_state_smb2(struct smbd_smb2_request *smb2req,
        if (!smb2req) {
                return false;
        }
-       if (smb2req->subreq == NULL) {
+       if (smb2req->async_te == NULL) {
                return false;
        }
        req = smb2req->subreq;