From: Stefan Metzmacher Date: Thu, 15 May 2025 11:59:00 +0000 (+0200) Subject: s3:client: make use of smbXcli_conn_monitor_once() X-Git-Tag: tdb-1.4.14~191 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=634f974893ef8d07a01cfa343a7cd39dd4ec60c8;p=thirdparty%2Fsamba.git s3:client: make use of smbXcli_conn_monitor_once() This makes it possible to run checks based on a tevent_context in future. Signed-off-by: Stefan Metzmacher Reviewed-by: Volker Lendecke --- diff --git a/source3/client/client.c b/source3/client/client.c index 7857f7e56f5..e96efb9ea23 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -6130,9 +6130,12 @@ static bool finished; static void cli_status_check(void) { - if (!cli_state_is_connected(cli)) { - DEBUG(0,("SMB echo failed (%s). The connection is " - "disconnected now\n", nt_errstr(NT_STATUS_CONNECTION_DISCONNECTED))); + NTSTATUS status; + + status = smbXcli_conn_monitor_once(cli->conn); + if (!NT_STATUS_IS_OK(status)) { + D_ERR("The connection is disconnected now: %s\n", + nt_errstr(status)); finished = true; smb_readline_done(); }