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 | c2a3b11b0738f57accafe19c84b682f761fa9631 (patch) | |
tree | 4b9f28894efb7376d2ea987adb791906e5e54076 /source3/rpc_client | |
parent | 5db56cfce45b58087fdadeb842f08a5b75d828c9 (diff) | |
download | samba-c2a3b11b0738f57accafe19c84b682f761fa9631.tar.gz samba-c2a3b11b0738f57accafe19c84b682f761fa9631.tar.xz samba-c2a3b11b0738f57accafe19c84b682f761fa9631.zip |
starting "connection reuse" system in smb-agent. added version number
which isn't actually used right now :-)
(This used to be commit d54a64ae3ab7cdc1ac67fb49f7255e6a106d624e)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_use.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/rpc_client/cli_use.c b/source3/rpc_client/cli_use.c index 31e3b69b2ef..131edfeb5bc 100644 --- a/source3/rpc_client/cli_use.c +++ b/source3/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 */ |