summaryrefslogtreecommitdiff
path: root/source4/rpc_server/dcerpc_sock.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-28 11:59:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:04:54 -0500
commit8262efeb0b918785d45d1fd9e971b5ed44a3ccfb (patch)
tree9e95ee90db2e04c331d5b5bc57e18b86c8031523 /source4/rpc_server/dcerpc_sock.c
parent28c3dcf6a3be18fd9fcb56bff039925a1244508d (diff)
downloadsamba-8262efeb0b918785d45d1fd9e971b5ed44a3ccfb.tar.gz
samba-8262efeb0b918785d45d1fd9e971b5ed44a3ccfb.tar.bz2
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/dcerpc_sock.c')
-rw-r--r--source4/rpc_server/dcerpc_sock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/rpc_server/dcerpc_sock.c b/source4/rpc_server/dcerpc_sock.c
index 32d1f0df35..508f42d2fb 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;
}