diff options
-rw-r--r-- | source3/rpc_server/srv_pipe_hnd.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c index 4b20ee5558..a4a9e85ae4 100644 --- a/source3/rpc_server/srv_pipe_hnd.c +++ b/source3/rpc_server/srv_pipe_hnd.c @@ -240,9 +240,6 @@ smb_np_struct *open_rpc_pipe_p(char *pipe_name, for (p_it = Pipes; p_it; p_it = p_it->next) DEBUG(5,("open pipes: name %s pnum=%x\n", p_it->name, p_it->pnum)); - /* Ensure the connection isn't idled whilst this pipe is open. */ - conn->num_files_open++; - return chain_p; } @@ -301,6 +298,10 @@ static void *make_internal_rpc_pipe_p(char *pipe_name, DLIST_ADD(InternalPipes, p); p->conn = conn; + + /* Ensure the connection isn't idled whilst this pipe is open. */ + p->conn->num_files_open++; + p->vuid = vuid; p->ntlmssp_chal_flags = 0; @@ -1059,8 +1060,6 @@ BOOL close_rpc_pipe_hnd(smb_np_struct *p) SAFE_FREE(p); - conn->num_files_open--; - return True; } @@ -1090,6 +1089,8 @@ static BOOL close_internal_rpc_pipe_hnd(void *np_conn) DLIST_REMOVE(InternalPipes, p); + p->conn->num_files_open--; + ZERO_STRUCTP(p); SAFE_FREE(p); |