1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-12 12:23:50 +03:00

starting "connection reuse" system in smb-agent. added version number

which isn't actually used right now :-)
This commit is contained in:
Luke Leighton
-
parent a47cc64470
commit d54a64ae3a
6 changed files with 164 additions and 76 deletions

View File

@@ -156,7 +156,8 @@ static struct cli_use *cli_find(const char* srv_name,
{
continue;
}
if (!pwd_compare(&usr_creds->pwd, &c->cli->usr.pwd))
if (!usr_creds->reuse &&
!pwd_compare(&usr_creds->pwd, &c->cli->usr.pwd))
{
continue;
}
@@ -221,6 +222,12 @@ struct cli_state *cli_net_use_add(const char* srv_name,
return cli->cli;
}
/* reuse an existing connection requested, and one was not found */
if (usr_creds != NULL && usr_creds->reuse)
{
return False;
}
/*
* allocate
*/