From 36493bf2f6634b84c57107bcb86bcbf3e82e80fc Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Wed, 6 Jan 2010 12:13:35 +0800 Subject: s3: Fix infinite loop in NCACN_IP_TCP asa there is no timeout. Assume lsa_pipe_tcp is ok but network is down, then send request is ok, but select() on writeable fds loops forever since there is no response. Signed-off-by: Bo Yang --- source3/rpc_client/rpc_transport_np.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source3/rpc_client/rpc_transport_np.c') diff --git a/source3/rpc_client/rpc_transport_np.c b/source3/rpc_client/rpc_transport_np.c index de748d9bbc..9f8872c467 100644 --- a/source3/rpc_client/rpc_transport_np.c +++ b/source3/rpc_client/rpc_transport_np.c @@ -402,3 +402,15 @@ struct cli_state *rpc_pipe_np_smb_conn(struct rpc_pipe_client *p) } return state->cli; } + +void rpccli_close_np_fd(struct rpc_pipe_client *p) +{ + struct cli_state *cli = rpc_pipe_np_smb_conn(p); + if (cli) { + if (cli->fd != -1) { + close(cli->fd); + cli->fd = -1; + } + } + return; +} -- cgit