mirror of
https://github.com/samba-team/samba.git
synced 2025-07-29 15:42:04 +03:00
s3: libsmb: Correctly do lifecycle management on cli->smb1.tcon and cli->smb2.tcon.
Treat them identically. Create them on demand after for a tcon call,
and delete them on a tdis call.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12831
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
(cherry picked from commit 50f50256aa
)
This commit is contained in:
committed by
Karolin Seeger
parent
de0fbbe0dd
commit
d2a309b90e
@ -227,11 +227,6 @@ struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx,
|
||||
|
||||
cli->smb1.pid = (uint32_t)getpid();
|
||||
cli->smb1.vc_num = cli->smb1.pid;
|
||||
cli->smb1.tcon = smbXcli_tcon_create(cli);
|
||||
if (cli->smb1.tcon == NULL) {
|
||||
goto error;
|
||||
}
|
||||
smb1cli_tcon_set_id(cli->smb1.tcon, UINT16_MAX);
|
||||
cli->smb1.session = smbXcli_session_create(cli, cli->conn);
|
||||
if (cli->smb1.session == NULL) {
|
||||
goto error;
|
||||
|
Reference in New Issue
Block a user