From c6694a06b546d04a528a3e97c7d1ff696a3c2756 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 19 Jan 2010 14:23:05 -0800 Subject: core: fix mm_modem_check_removed() to return errors correctly Make sure all errors actually get returned, not just removal errors. --- src/mm-modem.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src') 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 -- cgit v1.2.3-70-g09d2