diff options
author | Tim Potter <tpot@samba.org> | 2001-05-04 07:25:43 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2001-05-04 07:25:43 +0000 |
commit | 657804f3be2b621c8ee15bdb905879e208f9ca2f (patch) | |
tree | b8092d3b76ee85d0d5089f51ace8fdd981d16c76 /source/rpc_client/cli_pipe.c | |
parent | 23427a57da8b18506bbd970e5d7491c0917f6d06 (diff) | |
download | samba-657804f3be2b621c8ee15bdb905879e208f9ca2f.tar.gz samba-657804f3be2b621c8ee15bdb905879e208f9ca2f.tar.xz samba-657804f3be2b621c8ee15bdb905879e208f9ca2f.zip |
Added a SMB_ASSERT() so that two cli_state structures aren't opened
on different pipes. This seriously confuses NT. Unfortunately HEAD
branch is limited to one rpc pipe per connection as the fnum is stored
inside the cli_state structure. It should really be broken out into
it's own structure so multiple pipes can be opened on one TCP/IP socket.
What a good idea! But look over here! I've already done it in another
workarea but it will require a day or two to refactor some of the internal
samba rpc client stuff (i.e netlogon requests) so it will remain uncommitted
for another while.
Diffstat (limited to 'source/rpc_client/cli_pipe.c')
-rw-r--r-- | source/rpc_client/cli_pipe.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/rpc_client/cli_pipe.c b/source/rpc_client/cli_pipe.c index b4ca34ea7d5..0ae07325042 100644 --- a/source/rpc_client/cli_pipe.c +++ b/source/rpc_client/cli_pipe.c @@ -1192,6 +1192,8 @@ BOOL cli_nt_session_open(struct cli_state *cli, char *pipe_name) { int fnum; + SMB_ASSERT(cli->nt_pipe_fnum == 0); + if (cli->capabilities & CAP_NT_SMBS) { if ((fnum = cli_nt_create(cli, &(pipe_name[5]), DESIRED_ACCESS_PIPE)) == -1) { DEBUG(0,("cli_nt_session_open: cli_nt_create failed on pipe %s to machine %s. Error was %s\n", @@ -1253,4 +1255,5 @@ close the session void cli_nt_session_close(struct cli_state *cli) { cli_close(cli, cli->nt_pipe_fnum); + cli->nt_pipe_fnum = 0; } |