summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-11-24 11:24:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:06:07 -0500
commit3fd0f21cd9babe49281205705abe5b7a8175ad74 (patch)
tree4742eac8473153b1db80479bc85b088168c4a64b /source4/librpc/rpc
parentf2a605eeab5752e4884987496f2661368f85b271 (diff)
downloadsamba-3fd0f21cd9babe49281205705abe5b7a8175ad74.tar.gz
samba-3fd0f21cd9babe49281205705abe5b7a8175ad74.tar.bz2
samba-3fd0f21cd9babe49281205705abe5b7a8175ad74.zip
r3941: make sure we don't keep pounding on a ncacn_ip_tcp connection after it is dead
(This used to be commit f0263672fd1eb79bfa3a94663de1cea996c92880)
Diffstat (limited to 'source4/librpc/rpc')
-rw-r--r--source4/librpc/rpc/dcerpc_sock.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/librpc/rpc/dcerpc_sock.c b/source4/librpc/rpc/dcerpc_sock.c
index 361d0d4a5f..8de43d8454 100644
--- a/source4/librpc/rpc/dcerpc_sock.c
+++ b/source4/librpc/rpc/dcerpc_sock.c
@@ -73,6 +73,8 @@ static void sock_dead(struct dcerpc_pipe *p, NTSTATUS status)
if (!NT_STATUS_IS_OK(status)) {
p->transport.recv_data(p, NULL, status);
}
+
+ sock->fde->flags &= ~(EVENT_FD_WRITE | EVENT_FD_READ);
}
/*
@@ -230,6 +232,10 @@ static NTSTATUS sock_send_request(struct dcerpc_pipe *p, DATA_BLOB *data, BOOL t
struct sock_private *sock = p->transport.private;
struct sock_blob *blob;
+ if (sock->sock == NULL) {
+ return NT_STATUS_CONNECTION_DISCONNECTED;
+ }
+
blob = talloc_p(sock, struct sock_blob);
if (blob == NULL) {
return NT_STATUS_NO_MEMORY;