From 2c5af4f0bcd150b950462b2640dcd78dcbb522d6 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Mon, 24 Oct 2016 13:32:59 +0200 Subject: [PATCH] core: use a default timeout of 300s for the scan networks operation This is the value which we actually suggest in the manpage for the mmcli operation, so just use the same one. Scanning for 3GPP networks may really take a long time, so a specific timeout must be given: $ mmcli -m 0 --3gpp-scan --timeout=300 Found 4 networks: 21404 - Yoigo (umts, available) 21407 - Movistar (umts, current) 21401 - vodafone ES (umts, forbidden) 21403 - Orange (umts, forbidden) https://bugs.freedesktop.org/show_bug.cgi?id=98235 --- plugins/novatel/mm-broadband-modem-novatel-lte.c | 2 +- src/mm-broadband-modem-mbim.c | 2 +- src/mm-broadband-modem-qmi.c | 2 +- src/mm-broadband-modem.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/novatel/mm-broadband-modem-novatel-lte.c b/plugins/novatel/mm-broadband-modem-novatel-lte.c index 8fab1521..e5be522d 100644 --- a/plugins/novatel/mm-broadband-modem-novatel-lte.c +++ b/plugins/novatel/mm-broadband-modem-novatel-lte.c @@ -631,7 +631,7 @@ scan_networks (MMIfaceModem3gpp *self, mm_base_modem_at_command (MM_BASE_MODEM (self), "+COPS=?", - 120, + 300, FALSE, (GAsyncReadyCallback)cops_query_ready, result); diff --git a/src/mm-broadband-modem-mbim.c b/src/mm-broadband-modem-mbim.c index c20a726f..4e63b19c 100644 --- a/src/mm-broadband-modem-mbim.c +++ b/src/mm-broadband-modem-mbim.c @@ -2876,7 +2876,7 @@ modem_3gpp_scan_networks (MMIfaceModem3gpp *self, message = mbim_message_visible_providers_query_new (MBIM_VISIBLE_PROVIDERS_ACTION_FULL_SCAN, NULL); mbim_device_command (device, message, - 120, + 300, NULL, (GAsyncReadyCallback)visible_providers_query_ready, result); diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c index b4f7b567..1a137911 100644 --- a/src/mm-broadband-modem-qmi.c +++ b/src/mm-broadband-modem-qmi.c @@ -4325,7 +4325,7 @@ modem_3gpp_scan_networks (MMIfaceModem3gpp *self, mm_dbg ("Scanning networks..."); qmi_client_nas_network_scan (QMI_CLIENT_NAS (client), NULL, - 100, + 300, NULL, (GAsyncReadyCallback)nas_network_scan_ready, result); diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index b55ed73c..5834e0cb 100644 --- a/src/mm-broadband-modem.c +++ b/src/mm-broadband-modem.c @@ -3753,7 +3753,7 @@ modem_3gpp_scan_networks (MMIfaceModem3gpp *self, { mm_base_modem_at_command (MM_BASE_MODEM (self), "+COPS=?", - 120, + 300, FALSE, callback, user_data);