diff options
author | Matthew Chapman <matty@samba.org> | 1999-03-21 13:01:31 +0000 |
---|---|---|
committer | Matthew Chapman <matty@samba.org> | 1999-03-21 13:01:31 +0000 |
commit | a4bc522a7292f3bb87740e87df8449ba0ea6be10 (patch) | |
tree | 567afaaf6f062dfc272f97e68ee1de2bd56aa9a9 /source3/rpc_server | |
parent | 2a34b224b83f72ae30ab1eb67391c331407c6335 (diff) | |
download | samba-a4bc522a7292f3bb87740e87df8449ba0ea6be10.tar.gz samba-a4bc522a7292f3bb87740e87df8449ba0ea6be10.tar.bz2 samba-a4bc522a7292f3bb87740e87df8449ba0ea6be10.zip |
The line:
this_pdu_data_pos = data_pos - p->prev_pdu_file_offset;
is correct for first two PDU's only, after that it results in extra
garbage after each fragment and hence "Protocol Error" messages from
NT4 SP4. Changed to:
this_pdu_data_pos = (pdu_data_sent == 0) ? 0 : (pdu_data_sent - 0x18);
(This used to be commit b9e8a3ef3a25a81c4bb125bdd4f4d8334a578c85)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_pipe_hnd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c index 27aa79381c..531fcf6add 100644 --- a/source3/rpc_server/srv_pipe_hnd.c +++ b/source3/rpc_server/srv_pipe_hnd.c @@ -230,8 +230,8 @@ int read_pipe(pipes_struct *p, char *data, uint32 pos, int n) /* the read request starts from where the SMBtrans2 left off. */ data_pos = p->file_offset - p->hdr_offsets; - this_pdu_data_pos = data_pos - p->prev_pdu_file_offset; pdu_data_sent = p->file_offset - p->prev_pdu_file_offset; + this_pdu_data_pos = (pdu_data_sent == 0) ? 0 : (pdu_data_sent - 0x18); if (!IS_BITS_SET_ALL(p->hdr.flags, RPC_FLG_LAST)) { @@ -255,7 +255,7 @@ int read_pipe(pipes_struct *p, char *data, uint32 pos, int n) } pdu_len = mem_buf_len(p->rhdr.data); - num = pdu_len - (int)this_pdu_data_pos; + num = pdu_len - this_pdu_data_pos; DEBUG(6,("read_pipe: pdu_len: %d num: %d n: %d\n", pdu_len, num, n)); |