]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:client: make use of smbXcli_conn_monitor_once()
authorStefan Metzmacher <metze@samba.org>
Thu, 15 May 2025 11:59:00 +0000 (13:59 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 18 Jun 2025 17:52:37 +0000 (17:52 +0000)
This makes it possible to run checks based on
a tevent_context in future.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/client/client.c

index 7857f7e56f5dca1a5dbaad10ab3d89aa1fa8f263..e96efb9ea23fa9fdd7ea31c64fabb011b5228acc 100644 (file)
@@ -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();
        }