From: Stefan Metzmacher Date: Mon, 15 May 2017 20:49:09 +0000 (+0200) Subject: s4:librpc: simplify dcerpc_connect_timeout_handler() logic X-Git-Tag: ldb-1.1.30~124 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c3e99d1697b83f7dd498596a274fe2e8e96116d;p=thirdparty%2Fsamba.git s4:librpc: simplify dcerpc_connect_timeout_handler() logic Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett --- diff --git a/source4/librpc/rpc/dcerpc.h b/source4/librpc/rpc/dcerpc.h index 3223948cf9d..eaa3c627b74 100644 --- a/source4/librpc/rpc/dcerpc.h +++ b/source4/librpc/rpc/dcerpc.h @@ -136,14 +136,6 @@ struct dcerpc_pipe { /** timeout for individual rpc requests, in seconds */ uint32_t request_timeout; - /* - * Set for the timeout in dcerpc_pipe_connect_b_send(), to - * allow the timeout not to destory the stack during a nested - * event loop caused by gensec_update() - */ - bool inhibit_timeout_processing; - bool timed_out; - bool verified_pcontext; }; diff --git a/source4/librpc/rpc/dcerpc_connect.c b/source4/librpc/rpc/dcerpc_connect.c index 8ed12578e21..723e657c70a 100644 --- a/source4/librpc/rpc/dcerpc_connect.c +++ b/source4/librpc/rpc/dcerpc_connect.c @@ -1004,12 +1004,7 @@ static void dcerpc_connect_timeout_handler(struct tevent_context *ev, struct tev { struct composite_context *c = talloc_get_type_abort(private_data, struct composite_context); - struct pipe_connect_state *s = talloc_get_type_abort(c->private_data, struct pipe_connect_state); - if (!s->pipe->inhibit_timeout_processing) { - composite_error(c, NT_STATUS_IO_TIMEOUT); - } else { - s->pipe->timed_out = true; - } + composite_error(c, NT_STATUS_IO_TIMEOUT); } /* @@ -1053,9 +1048,6 @@ _PUBLIC_ struct composite_context* dcerpc_pipe_connect_b_send(TALLOC_CTX *parent s->credentials = credentials; s->lp_ctx = lp_ctx; - s->pipe->timed_out = false; - s->pipe->inhibit_timeout_processing = false; - tevent_add_timer(c->event_ctx, c, timeval_current_ofs(DCERPC_REQUEST_TIMEOUT, 0), dcerpc_connect_timeout_handler, c);