summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2013-04-25 15:07:19 -0500
committerDan Williams <dcbw@redhat.com>2013-04-25 15:09:10 -0500
commit7d3a4aba4fb0f7920e40f88836698a0a10bc7e3c (patch)
treeb59996951be5fa1da3c4850b9e086207c69e049e
parent135bec690ddbb1b8974d90d60317c1ad1b6d935e (diff)
downloadModemManager-7d3a4aba4fb0f7920e40f88836698a0a10bc7e3c.tar.gz
broadband-modem: fix assertion during capabilities checking (bgo #698845)
If no capabilities could be determined from the modem's responses, result would be NULL but no error would be set, since the modem didn't time out or have some other critical error, it simply didn't report any recognized capabilities. Ensure that an error is reported in this case. https://bugzilla.gnome.org/show_bug.cgi?id=698845
-rw-r--r--src/mm-broadband-modem.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c
index 92b2050b9..764b4ed02 100644
--- a/src/mm-broadband-modem.c
+++ b/src/mm-broadband-modem.c
@@ -502,7 +502,15 @@ capabilities_sequence_ready (MMBaseModem *self,
result = mm_base_modem_at_sequence_finish (self, res, NULL, &error);
if (!result) {
- g_simple_async_result_take_error (ctx->result, error);
+ if (error)
+ g_simple_async_result_take_error (ctx->result, error);
+ else {
+ g_simple_async_result_set_error (ctx->result,
+ MM_CORE_ERROR,
+ MM_CORE_ERROR_FAILED,
+ "%s",
+ "Failed to determine modem capabilities.");
+ }
load_capabilities_context_complete_and_free (ctx);
return;
}