aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2021-10-13 12:45:00 +0200
committerAleksander Morgado <aleksander@aleksander.es>2021-10-13 13:14:10 +0200
commit58e617e03c17be9a16a5cf1229c8b4b01bd5b64f (patch)
tree50a25adc4c74a99066cfb098fb6c1ab7351ac9a7
parent05ddf7c2930fc7eee2ba25e71ec3b2f399d56646 (diff)
iface-modem-sar: fix initialization sequence completion
We cannot just return without completing the GTask. If we see the support check method failed, just keep on with the state machine so that the GTask is completed in the FAIL_IF_UNSUPPORTED step. Also, don't assume GError is set if FALSE is returned. This is the only kind of async method where we allow this right now.
-rw-r--r--src/mm-iface-modem-sar.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mm-iface-modem-sar.c b/src/mm-iface-modem-sar.c
index b1d3def4..2e92af1a 100644
--- a/src/mm-iface-modem-sar.c
+++ b/src/mm-iface-modem-sar.c
@@ -344,10 +344,11 @@ check_support_ready (MMIfaceModemSar *self,
GError *error = NULL;
if (!MM_IFACE_MODEM_SAR_GET_INTERFACE (self)->check_support_finish (self, res, &error)) {
- /* This error shouldn't be treated as critical */
- mm_obj_dbg (self, "SAR support check failed: %s", error->message);
- g_error_free (error);
- return;
+ if (error) {
+ /* This error shouldn't be treated as critical */
+ mm_obj_dbg (self, "SAR support check failed: %s", error->message);
+ g_error_free (error);
+ }
} else {
/* SAR is supported! */
g_object_set_qdata (G_OBJECT (self),