mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
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 657804f3be
)
This commit is contained in:
parent
206a2a61da
commit
4ca3b30aec
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user