Fix for a bug Jerry found with printing where a smbd connection may
authorJeremy Allison <jra@samba.org>
Tue, 23 Apr 2002 02:16:59 +0000 (02:16 +0000)
committerJeremy Allison <jra@samba.org>
Tue, 23 Apr 2002 02:16:59 +0000 (02:16 +0000)
be idled even with an open pipe.
Jeremy.

source/rpc_server/srv_pipe_hnd.c

index f3c6fcd9b525495ba5f5279352ec8b0dd8e234dd..c314f07dda5a3ed39f9bac16f2a2b43453fe825d 100644 (file)
@@ -267,6 +267,9 @@ pipes_struct *open_rpc_pipe_p(char *pipe_name,
        if (is_spoolss_pipe)
                current_spoolss_pipes_open++;
 
+       /* Ensure the connection isn't idled whilst this pipe is open. */
+       conn->num_files_open++;
+
        return chain_p;
 }
 
@@ -957,7 +960,9 @@ BOOL close_rpc_pipe_hnd(pipes_struct *p, connection_struct *conn)
        ZERO_STRUCTP(p);
 
        SAFE_FREE(p);
-       
+
+       conn->num_files_open--;
+
        return True;
 }