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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user