diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2019-09-17 13:28:51 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2019-10-11 09:24:22 +0000 |
commit | 765f26a40e3171840b6b9a3c1da2b8c85a5704dc (patch) | |
tree | f681bff0f62949ec4615460a4393abbc8bd987b4 | |
parent | 1f6f9eec4de507c4505981439d5890afc328b3f8 (diff) |
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.
-rw-r--r-- | src/mm-iface-modem.c | 8 |
1 files changed, 6 insertions, 2 deletions
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); } |