aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dan@ioncontrol.co>2024-12-27 23:34:55 -0600
committerDan Williams <dan@ioncontrol.co>2025-01-11 20:53:15 -0600
commitb178d462657192c49cd7679d60123d87948a4b6f (patch)
tree6ccf79f3aca61b692c137c8bfe1544b2cd86f814
parent60de5751b47f015d3a28bcb91354f3a966f64f9e (diff)
cli: set higher 3GPP Scan(), Register(), and Connect() method timeouts
Similar to voice call mmcli timeouts, set larger proxy-wide timeouts for long-running operations. Match these timeouts with the internal ModemManager timeouts for the AT/MBIM/QMI operation timeouts. Fixes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/941 Fixes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/942 Signed-off-by: Dan Williams <dan@ioncontrol.co>
-rw-r--r--cli/mmcli-modem-3gpp.c6
-rw-r--r--cli/mmcli-modem-simple.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/cli/mmcli-modem-3gpp.c b/cli/mmcli-modem-3gpp.c
index d160d2a2..dc344567 100644
--- a/cli/mmcli-modem-3gpp.c
+++ b/cli/mmcli-modem-3gpp.c
@@ -550,6 +550,9 @@ get_modem_ready (GObject *source,
/* Request to scan networks? */
if (scan_flag) {
g_debug ("Asynchronously scanning for networks...");
+
+ /* Setup operation timeout: 5 minutes (to match MM internal timeout) */
+ g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (ctx->modem_3gpp), 5 * 60 * 1000);
mm_modem_3gpp_scan (ctx->modem_3gpp,
ctx->cancellable,
(GAsyncReadyCallback)scan_ready,
@@ -560,6 +563,9 @@ get_modem_ready (GObject *source,
/* Request to register the modem? */
if (register_in_operator_str || register_home_flag) {
g_debug ("Asynchronously registering the modem...");
+
+ /* Setup operation timeout: 2 minutes (to match MM internal timeout) */
+ g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (ctx->modem_3gpp), 2 * 60 * 1000);
mm_modem_3gpp_register (ctx->modem_3gpp,
(register_in_operator_str ? register_in_operator_str : ""),
ctx->cancellable,
diff --git a/cli/mmcli-modem-simple.c b/cli/mmcli-modem-simple.c
index 174f144b..c4d37b5d 100644
--- a/cli/mmcli-modem-simple.c
+++ b/cli/mmcli-modem-simple.c
@@ -210,6 +210,9 @@ get_modem_ready (GObject *source,
g_debug ("Asynchronously connecting the modem...");
+ /* Setup operation timeout: 2 minutes (to match MM internal timeout) */
+ g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (ctx->modem_simple), 2 * 60 * 1000);
+
properties = mm_simple_connect_properties_new_from_string (connect_str, &error);
if (!properties) {
g_printerr ("Error parsing connect string: '%s'\n", error->message);