]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Move open_was_deferred to smb2_process.c
authorDavid Mulder <dmulder@suse.com>
Fri, 18 Mar 2022 20:08:12 +0000 (14:08 -0600)
committerJeremy Allison <jra@samba.org>
Thu, 7 Apr 2022 17:37:29 +0000 (17:37 +0000)
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/process.c
source3/smbd/proto.h
source3/smbd/smb2_process.c

index 4e26955575b226a6a4efed88f4bb4610d87eb4d0..afb90e9b95ec3a223fbbee466e4883218dec36e0 100644 (file)
@@ -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.
 ****************************************************************************/
index f312cf743595cd6887bdb454bff18883991085b5..470bc16e1054fb8ea88a24df7030c694d508b33f 100644 (file)
@@ -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  */
 
index 830662d514c1bad8f67e41e13711002d05a32574..5f953c70e36a89eb259394cabee42d7dfe73961f 100644 (file)
@@ -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;
+}