From 8b7a6df1807545164d9516287270a6e4673ac369 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 17 Sep 2004 10:45:21 +0000 Subject: r2383: fixed the handling of sending zero length dcerpc packets (I broke this recently, and this broke the autoidl code) (This used to be commit 01d66f68f6b21dc9b5c0702edcd4f56daeae9b9d) --- source4/librpc/rpc/dcerpc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source4/librpc') diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c index 5c771002af..ce2a434e47 100644 --- a/source4/librpc/rpc/dcerpc.c +++ b/source4/librpc/rpc/dcerpc.c @@ -785,6 +785,7 @@ struct rpc_request *dcerpc_request_send(struct dcerpc_pipe *p, struct dcerpc_packet pkt; DATA_BLOB blob; uint32_t remaining, chunk_size; + BOOL first_packet = True; p->transport.recv_data = dcerpc_request_recv_data; @@ -820,10 +821,11 @@ struct rpc_request *dcerpc_request_send(struct dcerpc_pipe *p, DLIST_ADD(p->pending, req); /* we send a series of pdus without waiting for a reply */ - while (remaining > 0) { + while (remaining > 0 || first_packet) { uint32_t chunk = MIN(chunk_size, remaining); BOOL last_frag = False; + first_packet = False; pkt.pfc_flags = 0; if (remaining == stub_data->length) { -- cgit