From 765f26a40e3171840b6b9a3c1da2b8c85a5704dc Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Tue, 17 Sep 2019 13:28:51 +0200 Subject: iface-modem: don't log error if it's in progress If we're loading signal quality or access technology, skip reporting any error message if the specific error received is 'in-progress'. Plugins will use this error when they cannot process the response to the operation, e.g. if it was already consumed by a URC handler. --- src/mm-iface-modem.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c index c2552a69..a2d4aa2e 100644 --- a/src/mm-iface-modem.c +++ b/src/mm-iface-modem.c @@ -1226,7 +1226,9 @@ access_technologies_check_ready (MMIfaceModem *self, if (g_error_matches (error, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED)) { mm_dbg ("Polling to refresh access technologies is unsupported"); ctx->access_technology_polling_supported = FALSE; - } else + } + /* Ignore logging any message if the error is in 'in-progress' */ + else if (!g_error_matches (error, MM_CORE_ERROR, MM_CORE_ERROR_IN_PROGRESS)) mm_dbg ("Couldn't refresh access technologies: '%s'", error->message); g_error_free (error); } @@ -1254,7 +1256,9 @@ signal_quality_check_ready (MMIfaceModem *self, if (g_error_matches (error, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED)) { mm_dbg ("Polling to refresh signal quality is unsupported"); ctx->signal_quality_polling_supported = FALSE; - } else + } + /* Ignore logging any message if the error is in 'in-progress' */ + else if (!g_error_matches (error, MM_CORE_ERROR, MM_CORE_ERROR_IN_PROGRESS)) mm_dbg ("Couldn't refresh signal quality: '%s'", error->message); g_error_free (error); } -- cgit v1.2.3-70-g09d2