- return True;
- }
- else
- {
- DEBUG(3,("%s Error closing pipe pnum=%x cnum=%d\n",
- timestring(),pnum, cnum));
- return False;
- }
+ bitmap_clear(bmap, p->pnum - pipe_handle_offset);
+
+ pipes_open--;
+
+ DEBUG(4,("closed pipe name %s pnum=%x (pipes_open=%d)\n",
+ p->name, p->pnum, pipes_open));
+
+ DLIST_REMOVE(Pipes, p);
+
+ ZERO_STRUCTP(p);
+
+ free(p);
+
+ return True;
+}
+
+/****************************************************************************
+ close an rpc pipe
+****************************************************************************/
+pipes_struct *get_rpc_pipe_p(char *buf, int where)
+{
+ int pnum = SVAL(buf,where);
+
+ if (chain_p) return chain_p;
+
+ return get_rpc_pipe(pnum);