summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-12-04 20:22:19 +0000
committerGerald Carter <jerry@samba.org>2003-12-04 20:22:19 +0000
commit386e319ab58ba18150fc497796576ec5f9389feb (patch)
tree83219a83bf99b901d1779eb072f92265e7ff83d2 /source3/rpc_server
parent708c22ab7ff999664c51c470e2fc969cee5f558d (diff)
downloadsamba-386e319ab58ba18150fc497796576ec5f9389feb.tar.gz
samba-386e319ab58ba18150fc497796576ec5f9389feb.tar.bz2
samba-386e319ab58ba18150fc497796576ec5f9389feb.zip
fix process_incoming_data() to return the number of bytes handled this call whether we have a complete pdu or not; fixes bug with multiple pdu request rpc's broken over SMBwriteX calls each
(This used to be commit 514acc655d58a660b2a2542ff81a880f1bdfc3f6)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_pipe_hnd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c
index a9fd9ec652..514c22d471 100644
--- a/source3/rpc_server/srv_pipe_hnd.c
+++ b/source3/rpc_server/srv_pipe_hnd.c
@@ -772,6 +772,7 @@ static ssize_t process_complete_pdu(pipes_struct *p)
static ssize_t process_incoming_data(pipes_struct *p, char *data, size_t n)
{
size_t data_to_copy = MIN(n, MAX_PDU_FRAG_LEN - p->in_data.pdu_received_len);
+ size_t old_pdu_received_len = p->in_data.pdu_received_len;
DEBUG(10,("process_incoming_data: Start: pdu_received_len = %u, pdu_needed_len = %u, incoming data = %u\n",
(unsigned int)p->in_data.pdu_received_len, (unsigned int)p->in_data.pdu_needed_len,
@@ -831,10 +832,11 @@ incoming data size = %u\n", (unsigned int)p->in_data.pdu_received_len, (unsigned
/*
* Do we have a complete PDU ?
+ * (return the nym of bytes handled in the call)
*/
if(p->in_data.pdu_received_len == p->in_data.pdu_needed_len)
- return process_complete_pdu(p);
+ return process_complete_pdu(p) - old_pdu_received_len;
DEBUG(10,("process_incoming_data: not a complete PDU yet. pdu_received_len = %u, pdu_needed_len = %u\n",
(unsigned int)p->in_data.pdu_received_len, (unsigned int)p->in_data.pdu_needed_len ));