summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Liddicott <sam@liddicott.com>2009-05-19 15:42:39 +0100
committerStefan Metzmacher <metze@samba.org>2009-05-20 10:16:43 +0200
commit8cd9c72d75aeb92d64e2781081fed8847727d289 (patch)
tree4337f4072058d888b4056c061afe688556b06134
parentac7f4fa380722e9e8c71f24c32475e3c0d3e1e90 (diff)
downloadsamba-8cd9c72d75aeb92d64e2781081fed8847727d289.tar.gz
samba-8cd9c72d75aeb92d64e2781081fed8847727d289.tar.xz
samba-8cd9c72d75aeb92d64e2781081fed8847727d289.zip
s4:smb_server: initialy read the first 4 bytes only
Stop packet_recv getting greedy and reading the whole socket and then dispatching te extra packets in a timer loop Signed-off-by: Sam Liddicott <sam@liddicott.com> Signed-off-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--source4/smb_server/smb_server.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c
index 6206a03b214..28116938004 100644
--- a/source4/smb_server/smb_server.c
+++ b/source4/smb_server/smb_server.c
@@ -145,6 +145,7 @@ static void smbsrv_accept(struct stream_connection *conn)
packet_set_event_context(smb_conn->packet, conn->event.ctx);
packet_set_fde(smb_conn->packet, conn->event.fde);
packet_set_serialise(smb_conn->packet);
+ packet_set_initial_read(smb_conn->packet, 4);
smb_conn->lp_ctx = conn->lp_ctx;
smb_conn->connection = conn;