aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-03-26 13:49:02 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-03-26 13:49:02 +0200
commitf07d3748c6bad7fda9d485ffb0144f8c3380460e (patch)
tree8b684c26bc0246027507647f39c9f016aededb3d /src
parent063c4f9bf8e59ba2ab2b5877446d685e816692f6 (diff)
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.
Diffstat (limited to 'src')
-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 fd232dbe..80d05001 100644
--- a/src/mm-broadband-modem.c
+++ b/src/mm-broadband-modem.c
@@ -1936,7 +1936,15 @@ modem_init_finish (MMIfaceModem *self,
GAsyncResult *res,
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[] = {