From f66bd1ae54c2d69b84790f4a2a860d4a3c65873e Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 23 Apr 2007 12:31:12 +0000 Subject: r22486: add a flag to ignore timeouts of a request and don't close the connection on timeout metze (This used to be commit 6b23ab1fd265e2a92456701fb02bd1838c098874) --- source4/librpc/rpc/dcerpc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source4/librpc/rpc/dcerpc.c') diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c index 79e897313d..e422fa5444 100644 --- a/source4/librpc/rpc/dcerpc.c +++ b/source4/librpc/rpc/dcerpc.c @@ -673,6 +673,17 @@ static void dcerpc_timeout_handler(struct event_context *ev, struct timed_event struct timeval t, void *private) { struct rpc_request *req = talloc_get_type(private, struct rpc_request); + + if (req->ignore_timeout) { + dcerpc_req_dequeue(req); + req->state = RPC_REQUEST_DONE; + req->status = NT_STATUS_IO_TIMEOUT; + if (req->async.callback) { + req->async.callback(req); + } + return; + } + dcerpc_connection_dead(req->p->conn, NT_STATUS_IO_TIMEOUT); } @@ -945,6 +956,7 @@ static struct rpc_request *dcerpc_request_send(struct dcerpc_pipe *p, req->flags = 0; req->fault_code = 0; req->async_call = async; + req->ignore_timeout = False; req->async.callback = NULL; req->async.private = NULL; req->recv_handler = NULL; -- cgit