summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-09-17 10:45:21 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:47 -0500
commit8b7a6df1807545164d9516287270a6e4673ac369 (patch)
treead6747904520b403a5e826f7d5cb6c05e64557ea /source4/librpc
parentdf2ed66bb0e592010b3b68734c508690c3f393ea (diff)
downloadsamba-8b7a6df1807545164d9516287270a6e4673ac369.tar.gz
samba-8b7a6df1807545164d9516287270a6e4673ac369.tar.bz2
samba-8b7a6df1807545164d9516287270a6e4673ac369.zip
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)
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/rpc/dcerpc.c4
1 files changed, 3 insertions, 1 deletions
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) {