diff options
author | Denis Kenzior <denkenz@gmail.com> | 2012-03-06 10:12:31 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2012-03-06 10:12:31 -0600 |
commit | ebac438d9325c34bfe22322c6234e25c86e125d7 (patch) | |
tree | 2d80e8a6d5f4e90ebeaed36a63555b0a5a7552d2 | |
parent | a6e7d6d9693ac8f3902b1c4cd2a849e6654052c9 (diff) | |
download | ofono-ebac438d9325c34bfe22322c6234e25c86e125d7.tar.bz2 |
voicecall: Fix strange GTA04 modem CLCC behavior
-rw-r--r-- | drivers/atmodem/voicecall.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/atmodem/voicecall.c b/drivers/atmodem/voicecall.c index d07052c8..e27eb475 100644 --- a/drivers/atmodem/voicecall.c +++ b/drivers/atmodem/voicecall.c @@ -145,8 +145,23 @@ static void clcc_poll_cb(gboolean ok, GAtResult *result, gpointer user_data) GSList *n, *o; struct ofono_call *nc, *oc; gboolean poll_again = FALSE; + struct ofono_error error; + + decode_at_error(&error, g_at_result_final_response(result)); if (!ok) { + /* + * On certain Option GTM modems CLCC polling can fail + * with a CME ERROR: 100. It seems to be safe to ignore + * it and continue polling anyway + */ + if (vd->vendor == OFONO_VENDOR_QUALCOMM_MSM && + error.type == OFONO_ERROR_TYPE_CME && + error.error == 100) { + poll_again = TRUE; + goto poll_again; + } + ofono_error("We are polling CLCC and received an error"); ofono_error("All bets are off for call management"); return; @@ -245,6 +260,7 @@ static void clcc_poll_cb(gboolean ok, GAtResult *result, gpointer user_data) vd->local_release = 0; +poll_again: if (poll_again && !vd->clcc_source) vd->clcc_source = g_timeout_add(POLL_CLCC_INTERVAL, poll_clcc, vc); |