summaryrefslogtreecommitdiff
path: root/source3/rpc_client/cli_pipe.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-05-04 07:25:43 +0000
committerTim Potter <tpot@samba.org>2001-05-04 07:25:43 +0000
commit4ca3b30aec403ce025f10a7553c9444e307eea63 (patch)
tree242c5c00a23ea0672faa231cdf6e5a29a2b56b99 /source3/rpc_client/cli_pipe.c
parent206a2a61dadabaf7b5f3d0b227b24b4fbd127f4d (diff)
downloadsamba-4ca3b30aec403ce025f10a7553c9444e307eea63.tar.gz
samba-4ca3b30aec403ce025f10a7553c9444e307eea63.tar.bz2
samba-4ca3b30aec403ce025f10a7553c9444e307eea63.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. (This used to be commit 657804f3be2b621c8ee15bdb905879e208f9ca2f)
Diffstat (limited to 'source3/rpc_client/cli_pipe.c')
-rw-r--r--source3/rpc_client/cli_pipe.c3
1 files changed, 3 insertions, 0 deletions
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;
}