diff options
author | Luke Leighton <lkcl@samba.org> | 1999-12-03 22:02:03 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-12-03 22:02:03 +0000 |
commit | d54a64ae3ab7cdc1ac67fb49f7255e6a106d624e (patch) | |
tree | 3eadca98ecfbb5f90c262060317e33d42b51c10d /source/rpc_client/cli_use.c | |
parent | a47cc6447036d0a8b8e3e096d7b51a37d10d3325 (diff) | |
download | samba-d54a64ae3ab7cdc1ac67fb49f7255e6a106d624e.tar.gz samba-d54a64ae3ab7cdc1ac67fb49f7255e6a106d624e.tar.xz samba-d54a64ae3ab7cdc1ac67fb49f7255e6a106d624e.zip |
starting "connection reuse" system in smb-agent. added version number
which isn't actually used right now :-)
Diffstat (limited to 'source/rpc_client/cli_use.c')
-rw-r--r-- | source/rpc_client/cli_use.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/rpc_client/cli_use.c b/source/rpc_client/cli_use.c index 31e3b69b2ef..131edfeb5bc 100644 --- a/source/rpc_client/cli_use.c +++ b/source/rpc_client/cli_use.c @@ -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 */ |