1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-08 04:58:40 +03:00

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

This commit is contained in:
Andrew Tridgell 2004-11-24 11:24:33 +00:00 committed by Gerald (Jerry) Carter
parent 4a52fae82d
commit f0263672fd
2 changed files with 9 additions and 0 deletions

View File

@ -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;

View File

@ -59,6 +59,9 @@ BOOL torture_rpc_countcalls(void)
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) {