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
This commit is contained in:
Dan Williams
2013-04-25 15:07:19 -05:00
parent 135bec690d
commit 7d3a4aba4f

View File

@@ -502,7 +502,15 @@ capabilities_sequence_ready (MMBaseModem *self,
result = mm_base_modem_at_sequence_finish (self, res, NULL, &error);
if (!result) {
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;
}