diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 126fa2838d9..e7d29adf560 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -684,10 +684,10 @@ static bool push_queued_message(struct smb_request *req, messages ready for processing. ****************************************************************************/ -static bool push_deferred_open_message_smb1(struct smb_request *req, - struct timeval timeout, - struct file_id id, - struct deferred_open_record *open_rec) +bool push_deferred_open_message_smb1(struct smb_request *req, + struct timeval timeout, + struct file_id id, + struct deferred_open_record *open_rec) { struct timeval_buf tvbuf; struct timeval end_time; @@ -710,27 +710,6 @@ static bool push_deferred_open_message_smb1(struct smb_request *req, return push_queued_message(req, req->request_time, end_time, open_rec); } -bool push_deferred_open_message_smb(struct smb_request *req, - struct timeval timeout, - struct file_id id, - struct deferred_open_record *open_rec) -{ -#if defined(WITH_SMB1SERVER) - if (req->smb2req) { -#endif - return push_deferred_open_message_smb2(req->smb2req, - req->request_time, - timeout, - id, - open_rec); -#if defined(WITH_SMB1SERVER) - } else { - return push_deferred_open_message_smb1(req, timeout, - id, open_rec); - } -#endif -} - static void smbd_sig_term_handler(struct tevent_context *ev, struct tevent_signal *se, int signum, diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 192be0a3a80..8f0b0af50d0 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -852,10 +852,6 @@ bool smb1_srv_send(struct smbXsrv_connection *xconn, char *buffer, bool do_signing, uint32_t seqnum, bool do_encrypt, struct smb_perfcount_data *pcd); -bool push_deferred_open_message_smb(struct smb_request *req, - struct timeval timeout, - struct file_id id, - struct deferred_open_record *open_rec); NTSTATUS allow_new_trans(struct trans_state *list, uint64_t mid); void reply_outbuf(struct smb_request *req, uint8_t num_words, uint32_t num_bytes); void smb_request_done(struct smb_request *req); @@ -893,6 +889,10 @@ void process_smb(struct smbXsrv_connection *xconn, uint8_t *inbuf, size_t nread, size_t unread_bytes, uint32_t seqnum, bool encrypted, struct smb_perfcount_data *deferred_pcd); +bool push_deferred_open_message_smb1(struct smb_request *req, + struct timeval timeout, + struct file_id id, + struct deferred_open_record *open_rec); /* The following definitions come from smbd/smb2_process.c */ @@ -922,6 +922,10 @@ bool open_was_deferred(struct smbXsrv_connection *xconn, uint64_t mid); bool get_deferred_open_message_state(struct smb_request *smbreq, struct timeval *p_request_time, struct deferred_open_record **open_rec); +bool push_deferred_open_message_smb(struct smb_request *req, + struct timeval timeout, + struct file_id id, + struct deferred_open_record *open_rec); /* The following definitions come from smbd/quotas.c */ diff --git a/source3/smbd/smb2_process.c b/source3/smbd/smb2_process.c index 8c6e64403fb..47519ec4d57 100644 --- a/source3/smbd/smb2_process.c +++ b/source3/smbd/smb2_process.c @@ -463,3 +463,24 @@ bool get_deferred_open_message_state(struct smb_request *smbreq, } return true; } + +bool push_deferred_open_message_smb(struct smb_request *req, + struct timeval timeout, + struct file_id id, + struct deferred_open_record *open_rec) +{ +#if defined(WITH_SMB1SERVER) + if (req->smb2req) { +#endif + return push_deferred_open_message_smb2(req->smb2req, + req->request_time, + timeout, + id, + open_rec); +#if defined(WITH_SMB1SERVER) + } else { + return push_deferred_open_message_smb1(req, timeout, + id, open_rec); + } +#endif +}