aboutsummaryrefslogtreecommitdiff
path: root/plugins/mm-modem-option-utils.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2011-06-16 17:12:41 +0200
committerGuido Günther <agx@sigxcpu.org>2014-02-05 08:38:26 +0100
commit59ed3390b9a798ff8bf9133cbc28c4539ad99f42 (patch)
tree2009d57abbd0061b4ee230516e004eb83509aac5 /plugins/mm-modem-option-utils.c
parentbbf8a053e07c66f336ed46a7fb6105dc30645596 (diff)
parent3dbe8df8bfe8741e1b9a48b56e41517816f17dc1 (diff)
Imported Debian patch 0.4.997-1debian/0.4.997-1
Diffstat (limited to 'plugins/mm-modem-option-utils.c')
-rw-r--r--plugins/mm-modem-option-utils.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/plugins/mm-modem-option-utils.c b/plugins/mm-modem-option-utils.c
index 35dd1ac..61ca5d1 100644
--- a/plugins/mm-modem-option-utils.c
+++ b/plugins/mm-modem-option-utils.c
@@ -32,6 +32,11 @@ option_get_allowed_mode_done (MMAtSerialPort *port,
MMCallbackInfo *info = (MMCallbackInfo *) user_data;
gboolean parsed = FALSE;
+ /* 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 if (!g_str_has_prefix (response->str, "_OPSYS: ")) {
@@ -95,6 +100,11 @@ option_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);
@@ -357,8 +367,14 @@ unsolicited_msg_done (MMAtSerialPort *port,
{
MMCallbackInfo *info = user_data;
- if (info)
+ if (info) {
+ /* If the modem has already been removed, return without
+ * scheduling callback */
+ if (mm_callback_info_check_modem_removed (info))
+ return;
+
mm_callback_info_chain_complete_one (info);
+ }
}
static void
@@ -394,6 +410,11 @@ get_act_octi_request_done (MMAtSerialPort *port,
MMModemGsmAccessTech octi = MM_MODEM_GSM_ACCESS_TECH_UNKNOWN;
MMModemGsmAccessTech owcti;
+ /* If the modem has already been removed, return without
+ * scheduling callback */
+ if (mm_callback_info_check_modem_removed (info))
+ return;
+
if (!error) {
if (parse_octi_response (response, &octi)) {
/* If no 3G tech yet or current tech isn't 3G, then 2G tech is the best */
@@ -416,6 +437,11 @@ get_act_owcti_request_done (MMAtSerialPort *port,
MMModemGsmAccessTech owcti = 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) {
p = mm_strip_tag (response->str, "_OWCTI:");
if (owcti_to_mm (*p, &owcti)) {