librpc/rpc/binding_handle.c ...
authorStefan Metzmacher <metze@samba.org>
Sat, 21 Sep 2013 07:25:32 +0000 (09:25 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 4 Jun 2019 11:14:55 +0000 (13:14 +0200)
librpc/rpc/binding_handle.c

index d856bbdbfbacf46255b53676f49a4982458e7278..067683c6c092837ce2593b6f0f7b39a06635021c 100644 (file)
@@ -892,13 +892,12 @@ static int dcerpc_binding_handle_call_params_push_state_destructor(
        struct dcerpc_binding_handle_call_params_pipe *pp =
                dcerpc_pipe_handle_data(state->p,
                struct dcerpc_binding_handle_call_params_pipe);
-       struct dcerpc_binding_handle_call_params_state *call_state =
-               tevent_req_data(pp->call_req,
-               struct dcerpc_binding_handle_call_params_state);
 
-       dcerpc_pipe_handle_connection_disconnect(call_state->pc);
-       call_state->pc = NULL;
-       call_state->call_pipe = NULL;
+       if (!state->is_last_chunk) {
+               return 0;
+       }
+
+       dcerpc_binding_handle_call_params_next_pipe(pp->call_req);
        return 0;
 }
 
@@ -929,6 +928,7 @@ static struct tevent_req *dcerpc_binding_handle_call_params_push_send(TALLOC_CTX
        }
        state->ev = ev;
        state->p = p;
+       state->is_last_chunk = true;
 
        tevent_req_defer_callback(req, state->ev);
 
@@ -1032,15 +1032,7 @@ static void dcerpc_binding_handle_call_params_push_done(struct tevent_req *subre
                return;
        }
 
-       talloc_set_destructor(state, NULL);
-
-       if (!state->is_last_chunk) {
-               tevent_req_done(req);
-               return;
-       }
-
        tevent_req_done(req);
-       dcerpc_binding_handle_call_params_next_pipe(pp->call_req);
 }
 
 static NTSTATUS dcerpc_binding_handle_call_params_push_recv(struct tevent_req *req)