diff options
author | Luke Leighton <lkcl@samba.org> | 1998-09-23 21:49:09 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1998-09-23 21:49:09 +0000 |
commit | 500a474aae49bd1cc8e75481a3b3cd6e79720d89 (patch) | |
tree | f54565577fcc595c6986aefece306ff7aff079f4 /source3/rpc_server | |
parent | 0e091a52074655aedeeaad488d61e241909a3dc5 (diff) | |
download | samba-500a474aae49bd1cc8e75481a3b3cd6e79720d89.tar.gz samba-500a474aae49bd1cc8e75481a3b3cd6e79720d89.tar.bz2 samba-500a474aae49bd1cc8e75481a3b3cd6e79720d89.zip |
nttrans.c:
winreg was missing from the list of pipes. advise using the array
already defined in... rpc_parse/parse_rpc.c's pipe_names[], but
writing code to strip "\PIPE\" from the front when making the
check.
one location to update when adding new pipes, not two.
srv_pipe_hnd.c:
moved the ZERO_STRUCT(p) macro to _before_ the DLIST_ADD(Pipes, p) macro.
dlinklist.h:
added { }s around the code inserted by DLIST_ADD and DLIST_REMOVE macros
(This used to be commit 29201d4b9b52652c7a992d0f6b677a09b4c33912)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_pipe_hnd.c | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c index 3b743188a3..cf7fc9334e 100644 --- a/source3/rpc_server/srv_pipe_hnd.c +++ b/source3/rpc_server/srv_pipe_hnd.c @@ -72,6 +72,9 @@ pipes_struct *open_rpc_pipe_p(char *pipe_name, pipes_struct *p; static int next_pipe; + DEBUG(4,("Open pipe requested %s (pipes_open=%d)\n", + pipe_name, pipes_open)); + /* not repeating pipe numbers makes it easier to track things in log files and prevents client bugs where pipe numbers are reused over connection restarts */ @@ -88,9 +91,15 @@ pipes_struct *open_rpc_pipe_p(char *pipe_name, next_pipe = (i+1) % MAX_OPEN_PIPES; + for (p = Pipes; p; p = p->next) + { + DEBUG(5,("open pipes: name %s pnum=%x\n", p->name, p->pnum)); + } + p = (pipes_struct *)malloc(sizeof(*p)); if (!p) return NULL; + ZERO_STRUCTP(p); DLIST_ADD(Pipes, p); bitmap_set(bmap, i); @@ -98,7 +107,6 @@ pipes_struct *open_rpc_pipe_p(char *pipe_name, pipes_open++; - ZERO_STRUCTP(p); p->pnum = i; p->open = True; @@ -123,7 +131,13 @@ pipes_struct *open_rpc_pipe_p(char *pipe_name, chain_p = p; - return p; + /* OVERWRITE p as a temp variable, to display all open pipes */ + for (p = Pipes; p; p = p->next) + { + DEBUG(5,("open pipes: name %s pnum=%x\n", p->name, p->pnum)); + } + + return chain_p; } @@ -304,8 +318,18 @@ pipes_struct *get_rpc_pipe(int pnum) { pipes_struct *p; - for (p=Pipes;p;p=p->next) { - if (p->pnum == pnum) { + DEBUG(4,("search for pipe pnum=%x\n", pnum)); + + for (p=Pipes;p;p=p->next) + { + DEBUG(5,("pipe name %s pnum=%x (pipes_open=%d)\n", + p->name, p->pnum, pipes_open)); + } + + for (p=Pipes;p;p=p->next) + { + if (p->pnum == pnum) + { chain_p = p; return p; } |