From 7d3a4aba4fb0f7920e40f88836698a0a10bc7e3c Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 25 Apr 2013 15:07:19 -0500 Subject: 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 --- src/mm-broadband-modem.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index 92b2050b..764b4ed0 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; } -- cgit v1.2.3-70-g09d2