diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 4e26955575b..afb90e9b95e 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -679,27 +679,6 @@ static bool push_queued_message(struct smb_request *req, return True; } -/**************************************************************************** - Return true if this mid is on the deferred queue and was not yet processed. -****************************************************************************/ - -bool open_was_deferred(struct smbXsrv_connection *xconn, uint64_t mid) -{ - struct smbd_server_connection *sconn = xconn->client->sconn; - struct pending_message_list *pml; - - if (sconn->using_smb2) { - return open_was_deferred_smb2(xconn, mid); - } - - for (pml = sconn->deferred_open_queue; pml; pml = pml->next) { - if (((uint64_t)SVAL(pml->buf.data,smb_mid)) == mid && !pml->processed) { - return True; - } - } - return False; -} - /**************************************************************************** Return the message queued by this mid. ****************************************************************************/ diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index f312cf74359..470bc16e105 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -852,7 +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 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); @@ -924,6 +923,7 @@ void remove_deferred_open_message_smb(struct smbXsrv_connection *xconn, uint64_t mid); bool schedule_deferred_open_message_smb(struct smbXsrv_connection *xconn, uint64_t mid); +bool open_was_deferred(struct smbXsrv_connection *xconn, uint64_t mid); /* The following definitions come from smbd/quotas.c */ diff --git a/source3/smbd/smb2_process.c b/source3/smbd/smb2_process.c index 830662d514c..5f953c70e36 100644 --- a/source3/smbd/smb2_process.c +++ b/source3/smbd/smb2_process.c @@ -393,3 +393,24 @@ bool schedule_deferred_open_message_smb(struct smbXsrv_connection *xconn, return false; } + +/**************************************************************************** + Return true if this mid is on the deferred queue and was not yet processed. +****************************************************************************/ + +bool open_was_deferred(struct smbXsrv_connection *xconn, uint64_t mid) +{ + struct smbd_server_connection *sconn = xconn->client->sconn; + struct pending_message_list *pml; + + if (sconn->using_smb2) { + return open_was_deferred_smb2(xconn, mid); + } + + for (pml = sconn->deferred_open_queue; pml; pml = pml->next) { + if (((uint64_t)SVAL(pml->buf.data,smb_mid)) == mid && !pml->processed) { + return True; + } + } + return False; +}