broadband-modem: fix error reporting in the modem initialization sequence
The initialization sequence doesn't expect any result, so `mm_base_modem_at_sequence_finish()' will actually return NULL even if there is no error. Therefore, we base the success of the sequence on the existence of a GError in the return.
This commit is contained in:
@@ -1936,7 +1936,15 @@ modem_init_finish (MMIfaceModem *self,
|
|||||||
GAsyncResult *res,
|
GAsyncResult *res,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
return !mm_base_modem_at_sequence_finish (MM_BASE_MODEM (self), res, NULL, error);
|
GError *inner_error = NULL;
|
||||||
|
|
||||||
|
mm_base_modem_at_sequence_finish (MM_BASE_MODEM (self), res, NULL, &inner_error);
|
||||||
|
if (inner_error) {
|
||||||
|
g_propagate_error (error, inner_error);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const MMBaseModemAtCommand modem_init_sequence[] = {
|
static const MMBaseModemAtCommand modem_init_sequence[] = {
|
||||||
|
Reference in New Issue
Block a user