aboutsummaryrefslogtreecommitdiff
path: root/src/mm-modem.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2011-05-16 12:16:04 +0200
committerAleksander Morgado <aleksander@lanedo.com>2011-06-05 17:51:00 +0200
commit9323daec015ecad65c39b6020b62e864c027d858 (patch)
tree3a26a62be12c53effbdefabdc70ae27eea728e0e /src/mm-modem.c
parentf7dff81eecd6694c2596200fc2c3226de0396b7d (diff)
core, plugins: if modem removed don't process response
We try to avoid a memory leak when info->error is reset, as well as a second re-schedule of the info.
Diffstat (limited to 'src/mm-modem.c')
-rw-r--r--src/mm-modem.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/mm-modem.c b/src/mm-modem.c
index d5351660..b3c1677d 100644
--- a/src/mm-modem.c
+++ b/src/mm-modem.c
@@ -33,25 +33,6 @@ static void impl_modem_factory_reset (MMModem *modem, const char *code, DBusGMet
#include "mm-modem-glue.h"
-/* Should be used from callbacks to check whether the modem was removed after
- * the callback's operation was started, but before the callback itself was
- * called, in which case the MMModem passed to the callback is NULL.
- */
-GError *
-mm_modem_check_removed (MMModem *self, const GError *error)
-{
- if (!self) {
- /* If the modem was NULL, the error *should* have been
- * MM_MODEM_ERROR_REMOVED. If it wasn't, make it that.
- */
- return g_error_new_literal (MM_MODEM_ERROR,
- MM_MODEM_ERROR_REMOVED,
- "The modem was removed.");
- }
-
- return error ? g_error_copy (error) : NULL;
-}
-
static void
async_op_not_supported (MMModem *self,
MMModemFn callback,