From 21ff48ed7d56837567aff3e396acf3bfd24cbc02 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Tue, 18 May 2021 12:24:39 +0200 Subject: [PATCH] libmm-glib: drop default timeout checks in Command() The g_dbus_proxy_get_default_timeout() is by default -1 unless explicitly updated, so the check doesn't make any sense really. We didn't see any warning produced because mmcli provides an explicit timeout of 30s, so it was never the default -1. --- libmm-glib/mm-modem.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/libmm-glib/mm-modem.c b/libmm-glib/mm-modem.c index 02e322dd..40629051 100644 --- a/libmm-glib/mm-modem.c +++ b/libmm-glib/mm-modem.c @@ -2900,8 +2900,6 @@ mm_modem_command (MMModem *self, g_return_if_fail (MM_IS_MODEM (self)); - if (g_dbus_proxy_get_default_timeout (G_DBUS_PROXY (self)) < timeout) - g_warning ("Requested command timeout is shorter than the default DBus timeout"); mm_gdbus_modem_call_command (MM_GDBUS_MODEM (self), cmd, timeout, cancellable, callback, user_data); } @@ -2935,9 +2933,6 @@ mm_modem_command_sync (MMModem *self, g_return_val_if_fail (MM_IS_MODEM (self), NULL); - if (g_dbus_proxy_get_default_timeout (G_DBUS_PROXY (self)) < timeout) - g_warning ("Requested command timeout is shorter than the default DBus timeout"); - if (!mm_gdbus_modem_call_command_sync (MM_GDBUS_MODEM (self), cmd, timeout, &result, cancellable, error)) return NULL;