From 4ca3b30aec403ce025f10a7553c9444e307eea63 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 4 May 2001 07:25:43 +0000 Subject: 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. (This used to be commit 657804f3be2b621c8ee15bdb905879e208f9ca2f) --- source3/rpc_client/cli_pipe.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/rpc_client/cli_pipe.c') diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index b4ca34ea7d..0ae0732504 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/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; } -- cgit