summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/rilmodem/voicecall.c12
-rw-r--r--drivers/rilmodem/voicecall.h1
2 files changed, 12 insertions, 1 deletions
diff --git a/drivers/rilmodem/voicecall.c b/drivers/rilmodem/voicecall.c
index 6c169166..1fce4a3a 100644
--- a/drivers/rilmodem/voicecall.c
+++ b/drivers/rilmodem/voicecall.c
@@ -396,6 +396,8 @@ static void rild_cb(struct ril_msg *message, gpointer user_data)
* DIAL_MODIFIED_TO_DIAL means redirection. The call we will see when
* polling will have a different called number.
*/
+ vd->suppress_clcc_poll = FALSE;
+
if (message->error == RIL_E_SUCCESS ||
(g_ril_vendor(vd->ril) == OFONO_RIL_VENDOR_AOSP &&
message->error == RIL_E_DIAL_MODIFIED_TO_DIAL)) {
@@ -448,8 +450,10 @@ static void dial(struct ofono_voicecall *vc,
/* Send request to RIL */
if (g_ril_send(vd->ril, RIL_REQUEST_DIAL, &rilp,
- rild_cb, cbd, g_free) > 0)
+ rild_cb, cbd, g_free) > 0) {
+ vd->suppress_clcc_poll = TRUE;
return;
+ }
g_free(cbd);
CALLBACK_WITH_FAILURE(cb, data);
@@ -594,6 +598,11 @@ void ril_call_state_notify(struct ril_msg *message, gpointer user_data)
g_ril_print_unsol_no_args(vd->ril, message);
+ if (vd->suppress_clcc_poll) {
+ DBG("suppress clcc poll!");
+ return;
+ }
+
/* Just need to request the call list again */
ril_poll_clcc(vc);
@@ -829,6 +838,7 @@ int ril_voicecall_probe(struct ofono_voicecall *vc, unsigned int vendor,
vd->vendor = vendor;
vd->cb = NULL;
vd->data = NULL;
+ vd->suppress_clcc_poll = FALSE;
clear_dtmf_queue(vd);
diff --git a/drivers/rilmodem/voicecall.h b/drivers/rilmodem/voicecall.h
index 31e120e3..beb25104 100644
--- a/drivers/rilmodem/voicecall.h
+++ b/drivers/rilmodem/voicecall.h
@@ -31,6 +31,7 @@ struct ril_voicecall_data {
void *data;
gchar *tone_queue;
gboolean tone_pending;
+ gboolean suppress_clcc_poll;
};
int ril_voicecall_probe(struct ofono_voicecall *vc, unsigned int vendor,