s4:librpc: simplify dcerpc_connect_timeout_handler() logic
authorStefan Metzmacher <metze@samba.org>
Mon, 15 May 2017 20:49:09 +0000 (22:49 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Sun, 21 May 2017 19:05:13 +0000 (21:05 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/librpc/rpc/dcerpc.h
source4/librpc/rpc/dcerpc_connect.c

index 3223948cf9d312f3cc839e943e621b9d1c54fdc4..eaa3c627b74894fd98145d5961fe89799b073d1d 100644 (file)
@@ -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;
 };
 
index 8ed12578e212f37425ad8bb870052a303ef41197..723e657c70ac7c40bfe97be5bda5f6144c9c32f5 100644 (file)
@@ -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);