aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2013-04-04 18:17:01 +0200
committerAleksander Morgado <aleksander@lanedo.com>2013-04-04 18:17:07 +0200
commit16520193f715453eac3c48eab3a648a0cadfb1b5 (patch)
tree2493788284ecfa91f6e8951976bdc395bb5a0a01
parent8016f32f04ac329f81ed04f9d1a0515546a70ba5 (diff)
mbm: remove connection attempt check poll explicitly when connected
Completing a MMCallbackInfo is done asynchronously (in an idle), which means that we may get the poll timeout called in between... [mm-at-serial-port.c:334] debug_log(): (ttyACM0): --> 'AT*ENAP?<CR>' [mm-at-serial-port.c:334] debug_log(): (ttyACM0): <-- '<CR><LF>*ENAP:2,""<CR><LF>' [mm-at-serial-port.c:334] debug_log(): (ttyACM0): <-- '<CR><LF>OK<CR><LF>' [mm-at-serial-port.c:334] debug_log(): (ttyACM0): --> 'AT*ENAP?<CR>' [mm-at-serial-port.c:334] debug_log(): (ttyACM0): <-- '<CR><LF>*ENAP:2,""<CR><LF>' [mm-at-serial-port.c:334] debug_log(): (ttyACM0): <-- '<CR><LF>OK<CR><LF>' [mm-at-serial-port.c:334] debug_log(): (ttyACM0): <-- '<CR><LF>*E2NAP: 1<CR><LF>' [mm-modem-mbm.c:703] mbm_e2nap_received(): connected [mm-port.c:181] mm_port_set_connected(): (wwan0): port now connected [mm-modem.c:764] mm_modem_set_state(): Modem /org/freedesktop/ModemManager/Modems/0: state changed (connecting -> connected) [mm-at-serial-port.c:334] debug_log(): (ttyACM0): <-- '<CR><LF>*ERINFO: 1,0,3<CR><LF>' [mm-generic-gsm.c:6215] simple_state_machine(): (wwan0): simple connect state 6 [mm-at-serial-port.c:334] debug_log(): (ttyACM0): --> 'AT*ENAP?<CR>' [mm-at-serial-port.c:334] debug_log(): (ttyACM0): <-- '<CR><LF>*ENAP:1,""<CR><LF>' [mm-at-serial-port.c:334] debug_log(): (ttyACM0): <-- '<CR><LF>OK<CR><LF>' modem-manager[12699]: mm_callback_info_schedule: assertion `info->called == FALSE' failed
-rw-r--r--plugins/mm-modem-mbm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/mm-modem-mbm.c b/plugins/mm-modem-mbm.c
index 9b7c36b3..f72d7f63 100644
--- a/plugins/mm-modem-mbm.c
+++ b/plugins/mm-modem-mbm.c
@@ -674,9 +674,13 @@ mbm_do_connect_done (MMModemMbm *self, gboolean success)
if (!priv->pending_connect_info)
return;
- if (success)
+ if (success) {
+ /* Explicitly remove the AT*ENAP? callback, or we may end up scheduling
+ * it with an already disposed MMCallbackInfo. */
+ mm_dbg ("disabled periodic connect attempt polling");
+ mm_callback_info_set_data (priv->pending_connect_info, "mbm-enap-poll-id", NULL, NULL);
mm_generic_gsm_connect_complete (MM_GENERIC_GSM (self), NULL, priv->pending_connect_info);
- else {
+ } else {
GError *connect_error;
connect_error = mm_modem_connect_error_for_code (MM_MODEM_CONNECT_ERROR_BUSY);