summaryrefslogtreecommitdiff
path: root/source4/lib/stream
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-11-14 03:45:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:46:17 -0500
commit614950aed35353854019db5cccec5b3154643ca3 (patch)
tree6322c8d22dc2da4fad46976651ed208b131911b3 /source4/lib/stream
parent763d862fee5c8d73088e93da0c5a2857eb77afc3 (diff)
downloadsamba-614950aed35353854019db5cccec5b3154643ca3.tar.gz
samba-614950aed35353854019db5cccec5b3154643ca3.tar.bz2
samba-614950aed35353854019db5cccec5b3154643ca3.zip
r11713: separate out the setting of the fde in the packet context from the
enabling of packet serialisation (This used to be commit 6a47cd65a8b588f9ddd375c57caaba08281e7cbb)
Diffstat (limited to 'source4/lib/stream')
-rw-r--r--source4/lib/stream/packet.c16
-rw-r--r--source4/lib/stream/packet.h3
2 files changed, 14 insertions, 5 deletions
diff --git a/source4/lib/stream/packet.c b/source4/lib/stream/packet.c
index 23db44ef02..45ca1feb45 100644
--- a/source4/lib/stream/packet.c
+++ b/source4/lib/stream/packet.c
@@ -127,16 +127,24 @@ void packet_set_event_context(struct packet_context *pc, struct event_context *e
}
/*
- tell the packet layer to serialise requests, so we don't process two requests at once on
- one connection. You must have set the event_context
+ tell the packet layer the fde for the socket
*/
-void packet_set_serialise(struct packet_context *pc, struct fd_event *fde)
+void packet_set_fde(struct packet_context *pc, struct fd_event *fde)
{
- pc->serialise = True;
pc->fde = fde;
}
/*
+ tell the packet layer to serialise requests, so we don't process two
+ requests at once on one connection. You must have set the
+ event_context and fde
+*/
+void packet_set_serialise(struct packet_context *pc)
+{
+ pc->serialise = True;
+}
+
+/*
tell the packet layer how much to read when starting a new packet
this ensures it doesn't overread
*/
diff --git a/source4/lib/stream/packet.h b/source4/lib/stream/packet.h
index 4a8c26a809..79d4acacd0 100644
--- a/source4/lib/stream/packet.h
+++ b/source4/lib/stream/packet.h
@@ -38,7 +38,8 @@ void packet_set_full_request(struct packet_context *pc, packet_full_request_fn_t
void packet_set_tls(struct packet_context *pc, struct tls_context *tls);
void packet_set_socket(struct packet_context *pc, struct socket_context *sock);
void packet_set_event_context(struct packet_context *pc, struct event_context *ev);
-void packet_set_serialise(struct packet_context *pc, struct fd_event *fde);
+void packet_set_fde(struct packet_context *pc, struct fd_event *fde);
+void packet_set_serialise(struct packet_context *pc);
void packet_set_initial_read(struct packet_context *pc, uint32_t initial_read);
void packet_set_nofree(struct packet_context *pc);
void packet_recv(struct packet_context *pc);