summaryrefslogtreecommitdiffstats
path: root/source3/smbd
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-05-23 12:30:21 +0200
committerJeremy Allison <jra@samba.org>2014-05-31 04:25:36 +0200
commit51077c6be665fb95c0ba06f5878a08503bf311df (patch)
tree1b383c5a72956420183685ff854aff455a825d1a /source3/smbd
parent629f4e87696ef891a342c0b2ec095e0a97158dce (diff)
downloadsamba-51077c6be665fb95c0ba06f5878a08503bf311df.tar.gz
samba-51077c6be665fb95c0ba06f5878a08503bf311df.tar.xz
samba-51077c6be665fb95c0ba06f5878a08503bf311df.zip
s3:smb2_server: call smbd_smb2_flush_send_queue() directly
This avoids recursion into smbd_smb2_io_handler(), which avoids confusion when analysing out put of performance analysing tools, e.g. callgrind. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat May 31 04:25:36 CEST 2014 on sn-devel-104
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/smb2_server.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index d3a38e2e49..69fe9e45c7 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -34,8 +34,7 @@ static void smbd_smb2_connection_handler(struct tevent_context *ev,
struct tevent_fd *fde,
uint16_t flags,
void *private_data);
-static NTSTATUS smbd_smb2_io_handler(struct smbd_server_connection *sconn,
- uint16_t fde_flags);
+static NTSTATUS smbd_smb2_flush_send_queue(struct smbd_server_connection *sconn);
static const struct smbd_smb2_dispatch_table {
uint16_t opcode;
@@ -1265,7 +1264,7 @@ static NTSTATUS smb2_send_async_interim_response(const struct smbd_smb2_request
DLIST_ADD_END(nreq->sconn->smb2.send_queue, &nreq->queue_entry, NULL);
nreq->sconn->smb2.send_queue_len++;
- status = smbd_smb2_io_handler(sconn, TEVENT_FD_WRITE);
+ status = smbd_smb2_flush_send_queue(sconn);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -1598,7 +1597,7 @@ static void smbd_smb2_request_pending_timer(struct tevent_context *ev,
DLIST_ADD_END(sconn->smb2.send_queue, &state->queue_entry, NULL);
sconn->smb2.send_queue_len++;
- status = smbd_smb2_io_handler(sconn, TEVENT_FD_WRITE);
+ status = smbd_smb2_flush_send_queue(sconn);
if (!NT_STATUS_IS_OK(status)) {
smbd_server_connection_terminate(sconn,
nt_errstr(status));
@@ -2499,7 +2498,7 @@ static NTSTATUS smbd_smb2_request_reply(struct smbd_smb2_request *req)
DLIST_ADD_END(req->sconn->smb2.send_queue, &req->queue_entry, NULL);
req->sconn->smb2.send_queue_len++;
- status = smbd_smb2_io_handler(sconn, TEVENT_FD_WRITE);
+ status = smbd_smb2_flush_send_queue(sconn);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -2829,7 +2828,7 @@ NTSTATUS smbd_smb2_send_oplock_break(struct smbd_server_connection *sconn,
DLIST_ADD_END(state->sconn->smb2.send_queue, &state->queue_entry, NULL);
state->sconn->smb2.send_queue_len++;
- status = smbd_smb2_io_handler(sconn, TEVENT_FD_WRITE);
+ status = smbd_smb2_flush_send_queue(sconn);
if (!NT_STATUS_IS_OK(status)) {
return status;
}