uint8_t _out_hdr_buf[NBT_HDR_SIZE + SMB2_HDR_BODY + 0x10];
DATA_BLOB out_data;
uint32_t out_remaining;
+ NTSTATUS status;
};
static struct smbd_smb2_read_state _state;
* request to be canceled
*/
//tevent_req_set_cancel_fn(req, smbd_smb2_read_cancel);
+ state->status = status;
return state;
//return req;
}
- //if (!NT_STATUS_EQUAL(status, NT_STATUS_RETRY)) {
+ if (!NT_STATUS_EQUAL(status, NT_STATUS_RETRY)) {
+ state->status = status;
+ return state;
// /* Real error in setting up aio. Fail. */
// tevent_req_nterror(req, status);
// return tevent_req_post(req, ev);
- //}
+ }
/* Fallback to synchronous. */
//tevent_req_done(req);
return state;//req;//tevent_req_post(req, ev);
} else {
-// if (!NT_STATUS_EQUAL(status, NT_STATUS_RETRY)) {
-// SMB_VFS_STRICT_UNLOCK(conn, fsp, &lock);
+ if (!NT_STATUS_EQUAL(status, NT_STATUS_RETRY)) {
+ SMB_VFS_STRICT_UNLOCK(conn, fsp, &lock);
+ state->status = status;
+ return state;
// tevent_req_nterror(req, status);
// return tevent_req_post(req, ev);
-// }
+ }
}
/* Ok, read into memory. Allocate the out buffer. */
// /* Success. */
// tevent_req_done(req);
// }
+ state->status = status;
+ return state;
return state;//req;//tevent_req_post(req, ev);
}
struct smbd_smb2_read_state *state = &_state;//tevent_req_data(req,
//struct smbd_smb2_read_state);
+ if (!NT_STATUS_IS_OK(state->status)) {
+ status = state->status;
+ ZERO_STRUCTP(state);
+ return status;
+ }
//if (tevent_req_is_nterror(req, &status)) {
// tevent_req_received(req);
// return status;