diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-10-28 11:59:03 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:04:54 -0500 |
commit | 8262efeb0b918785d45d1fd9e971b5ed44a3ccfb (patch) | |
tree | 9e95ee90db2e04c331d5b5bc57e18b86c8031523 /source4/rpc_server | |
parent | 28c3dcf6a3be18fd9fcb56bff039925a1244508d (diff) | |
download | samba-8262efeb0b918785d45d1fd9e971b5ed44a3ccfb.tar.gz samba-8262efeb0b918785d45d1fd9e971b5ed44a3ccfb.tar.xz samba-8262efeb0b918785d45d1fd9e971b5ed44a3ccfb.zip |
r3320: fixed bugs in the rpc_server code in handling partial packet receives and sends
it now passes the non-blocking test suite
(This used to be commit 6cdf485fb263c69d62ea2e98236d92ffbf6b7a3e)
Diffstat (limited to 'source4/rpc_server')
-rw-r--r-- | source4/rpc_server/dcerpc_server.c | 5 | ||||
-rw-r--r-- | source4/rpc_server/dcerpc_sock.c | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c index 9373b066431..fd605fb9553 100644 --- a/source4/rpc_server/dcerpc_server.c +++ b/source4/rpc_server/dcerpc_server.c @@ -907,7 +907,6 @@ NTSTATUS dcesrv_output(struct dcesrv_connection *dce_conn, struct dcesrv_call_state *call; struct dcesrv_call_reply *rep; ssize_t nwritten; - NTSTATUS status = NT_STATUS_OK; call = dce_conn->call_list; if (!call || !call->replies) { @@ -928,8 +927,6 @@ NTSTATUS dcesrv_output(struct dcesrv_connection *dce_conn, if (rep->data.length == 0) { /* we're done with this section of the call */ DLIST_REMOVE(call->replies, rep); - } else { - status = STATUS_BUFFER_OVERFLOW; } if (call->replies == NULL) { @@ -938,7 +935,7 @@ NTSTATUS dcesrv_output(struct dcesrv_connection *dce_conn, talloc_free(call); } - return status; + return NT_STATUS_OK; } diff --git a/source4/rpc_server/dcerpc_sock.c b/source4/rpc_server/dcerpc_sock.c index 32d1f0df358..508f42d2fba 100644 --- a/source4/rpc_server/dcerpc_sock.c +++ b/source4/rpc_server/dcerpc_sock.c @@ -39,7 +39,7 @@ static ssize_t dcerpc_write_fn(void *private, DATA_BLOB *out) size_t sendlen; status = socket_send(sock, out, &sendlen, 0); - if (!NT_STATUS_IS_OK(status)) { + if (NT_STATUS_IS_ERR(status)) { return -1; } @@ -265,6 +265,7 @@ void dcesrv_sock_recv(struct server_connection *conn, time_t t, uint16_t flags) return; } if (nread == 0) { + talloc_free(tmp_blob.data); return; } |