From: Stefan Metzmacher Date: Wed, 30 Sep 2020 21:21:04 +0000 (+0200) Subject: smb2_server: split out smbd_smb2_flush_with_sendmsg() out of smbd_smb2_flush_send_queue() X-Git-Tag: tevent-0.16.0~714 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02df6bda4902524d9fbcc961287779b3e770be2f;p=thirdparty%2Fsamba.git smb2_server: split out smbd_smb2_flush_with_sendmsg() out of smbd_smb2_flush_send_queue() We'll have an smbd_smb2_flush_with_io_uring() later... Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c index fa81082aacf..e596e059c1c 100644 --- a/source3/smbd/smb2_server.c +++ b/source3/smbd/smb2_server.c @@ -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.