svn commit: samba r3941 - in branches/SAMBA_4_0/source: librpc/rpc torture/rpc

tridge at samba.org tridge at samba.org
Wed Nov 24 11:24:34 GMT 2004


Author: tridge
Date: 2004-11-24 11:24:33 +0000 (Wed, 24 Nov 2004)
New Revision: 3941

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=3941

Log:
make sure we don't keep pounding on a ncacn_ip_tcp connection after it is dead

Modified:
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_sock.c
   branches/SAMBA_4_0/source/torture/rpc/countcalls.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_sock.c
===================================================================
--- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_sock.c	2004-11-24 09:44:57 UTC (rev 3940)
+++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_sock.c	2004-11-24 11:24:33 UTC (rev 3941)
@@ -73,6 +73,8 @@
 	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 @@
 	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;

Modified: branches/SAMBA_4_0/source/torture/rpc/countcalls.c
===================================================================
--- branches/SAMBA_4_0/source/torture/rpc/countcalls.c	2004-11-24 09:44:57 UTC (rev 3940)
+++ branches/SAMBA_4_0/source/torture/rpc/countcalls.c	2004-11-24 11:24:33 UTC (rev 3941)
@@ -59,6 +59,9 @@
 		status = dcerpc_request(p, NULL, i, p, &stub_in, &stub_out);
 		if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT) &&
 		    p->last_fault_code == DCERPC_FAULT_OP_RNG_ERROR) break;
+		if (NT_STATUS_EQUAL(status, NT_STATUS_CONNECTION_DISCONNECTED)) {
+			break;
+		}
 	}
 	
 	if (i==5000) {



More information about the samba-cvs mailing list