mirror of
https://github.com/samba-team/samba.git
synced 2025-01-22 22:04:08 +03:00
smbd: Move open_was_deferred to smb2_process.c
Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
86452205ab
commit
f1cc153ed9
@ -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.
|
||||
****************************************************************************/
|
||||
|
@ -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 */
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user