aboutsummaryrefslogtreecommitdiff
path: root/plugins/mm-modem-novatel-gsm.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mm-modem-novatel-gsm.c')
-rw-r--r--plugins/mm-modem-novatel-gsm.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/plugins/mm-modem-novatel-gsm.c b/plugins/mm-modem-novatel-gsm.c
index 64a81bd..5d78db7 100644
--- a/plugins/mm-modem-novatel-gsm.c
+++ b/plugins/mm-modem-novatel-gsm.c
@@ -118,6 +118,11 @@ set_allowed_mode_done (MMAtSerialPort *port,
{
MMCallbackInfo *info = (MMCallbackInfo *) user_data;
+ /* If the modem has already been removed, return without
+ * scheduling callback */
+ if (mm_callback_info_check_modem_removed (info))
+ return;
+
if (error)
info->error = g_error_copy (error);
@@ -227,8 +232,14 @@ get_allowed_mode_done (MMAtSerialPort *port,
MMCallbackInfo *info = (MMCallbackInfo *) user_data;
MMModemGsmAllowedMode mode = MM_MODEM_GSM_ALLOWED_MODE_ANY;
- info->error = mm_modem_check_removed (info->modem, error);
- if (!info->error) {
+ /* If the modem has already been removed, return without
+ * scheduling callback */
+ if (mm_callback_info_check_modem_removed (info))
+ return;
+
+ if (error)
+ info->error = g_error_copy (error);
+ else {
parse_nwrat_response (response, &mode, &info->error);
mm_callback_info_set_result (info, GUINT_TO_POINTER (mode), NULL);
}
@@ -265,6 +276,11 @@ get_act_request_done (MMAtSerialPort *port,
MMModemGsmAccessTech act = MM_MODEM_GSM_ACCESS_TECH_UNKNOWN;
const char *p;
+ /* If the modem has already been removed, return without
+ * scheduling callback */
+ if (mm_callback_info_check_modem_removed (info))
+ return;
+
if (error)
info->error = g_error_copy (error);
else {