diff options
author | Dan Williams <dcbw@redhat.com> | 2010-01-19 14:23:05 -0800 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2010-01-19 14:23:05 -0800 |
commit | c6694a06b546d04a528a3e97c7d1ff696a3c2756 (patch) | |
tree | fed560205a6c45ec1bb9945c1f9c85a1ad474ed1 /src/mm-modem.c | |
parent | f4d2e30525055591d0f3bddd99936be4a5e3d444 (diff) |
core: fix mm_modem_check_removed() to return errors correctly
Make sure all errors actually get returned, not just removal errors.
Diffstat (limited to 'src/mm-modem.c')
-rw-r--r-- | src/mm-modem.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mm-modem.c b/src/mm-modem.c index 27b77954..a65d8831 100644 --- a/src/mm-modem.c +++ b/src/mm-modem.c @@ -36,9 +36,6 @@ static void impl_modem_get_info (MMModem *modem, DBusGMethodInvocation *context) GError * mm_modem_check_removed (MMModem *self, const GError *error) { - if (g_error_matches (error, MM_MODEM_ERROR, MM_MODEM_ERROR_REMOVED)) - return g_error_copy (error); - if (!self) { /* If the modem was NULL, the error *should* have been * MM_MODEM_ERROR_REMOVED. If it wasn't, make it that. @@ -48,7 +45,7 @@ mm_modem_check_removed (MMModem *self, const GError *error) "The modem was removed."); } - return NULL; + return error ? g_error_copy (error) : NULL; } static void |