]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smb2_server: split out smbd_smb2_flush_with_sendmsg() out of smbd_smb2_flush_send_queue()
authorStefan Metzmacher <metze@samba.org>
Wed, 30 Sep 2020 21:21:04 +0000 (23:21 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 6 Sep 2023 19:30:35 +0000 (19:30 +0000)
We'll have an smbd_smb2_flush_with_io_uring() later...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/smb2_server.c

index fa81082aacfb6f8023703855fe228874174de1e6..e596e059c1c19481f6121480c114104489416dd1 100644 (file)
@@ -4765,7 +4765,7 @@ static NTSTATUS smbd_smb2_advance_send_queue(struct smbXsrv_connection *xconn,
        return NT_STATUS_OK;
 }
 
-static NTSTATUS smbd_smb2_flush_send_queue(struct smbXsrv_connection *xconn)
+static NTSTATUS smbd_smb2_flush_with_sendmsg(struct smbXsrv_connection *xconn)
 {
        int ret;
        int err;
@@ -4890,6 +4890,18 @@ static NTSTATUS smbd_smb2_flush_send_queue(struct smbXsrv_connection *xconn)
                }
        }
 
+       return NT_STATUS_MORE_PROCESSING_REQUIRED;
+}
+
+static NTSTATUS smbd_smb2_flush_send_queue(struct smbXsrv_connection *xconn)
+{
+       NTSTATUS status;
+
+       status = smbd_smb2_flush_with_sendmsg(xconn);
+       if (!NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
+               return status;
+       }
+
        /*
         * Restart reads if we were blocked on
         * draining the send queue.