mirror of
https://github.com/samba-team/samba.git
synced 2025-03-11 16:58:40 +03:00
s3: smbtorture3: Ensure run_tcon_test() always replaces any saved tcon and shuts down correctly even in error paths.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13992 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit f9ca91bd293e9f2710c4449c5d4f5d016a066049)
This commit is contained in:
parent
80d2c3e472
commit
a19f94c644
@ -1362,6 +1362,7 @@ static bool run_tcon_test(int dummy)
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
printf("%s refused 2nd tree connect (%s)\n", host,
|
||||
nt_errstr(status));
|
||||
cli_state_restore_tcon(cli, orig_tcon);
|
||||
cli_shutdown(cli);
|
||||
return False;
|
||||
}
|
||||
@ -1414,6 +1415,8 @@ static bool run_tcon_test(int dummy)
|
||||
status = cli_close(cli, fnum1);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
printf("close failed (%s)\n", nt_errstr(status));
|
||||
cli_state_restore_tcon(cli, orig_tcon);
|
||||
cli_shutdown(cli);
|
||||
return False;
|
||||
}
|
||||
|
||||
@ -1422,6 +1425,8 @@ static bool run_tcon_test(int dummy)
|
||||
status = cli_tdis(cli);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
printf("secondary tdis failed (%s)\n", nt_errstr(status));
|
||||
cli_state_restore_tcon(cli, orig_tcon);
|
||||
cli_shutdown(cli);
|
||||
return False;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user