* [PATCH v2] Connecting a phone with mpty call does not trigger CLCC polling
@ 2015-06-03 17:25 Kuba Pawlak
2015-06-04 21:19 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: Kuba Pawlak @ 2015-06-03 17:25 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1774 bytes --]
If there is more then one active or held call, we are in mpty calls.
We won't get indicator update if any of them is released by CHLD=1x.
So we have to poll it.
---
drivers/hfpmodem/voicecall.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/hfpmodem/voicecall.c b/drivers/hfpmodem/voicecall.c
index afeb35f..e3e6e0f 100644
--- a/drivers/hfpmodem/voicecall.c
+++ b/drivers/hfpmodem/voicecall.c
@@ -1134,6 +1134,10 @@ static void hfp_clcc_cb(gboolean ok, GAtResult *result, gpointer user_data)
struct ofono_voicecall *vc = user_data;
struct voicecall_data *vd = ofono_voicecall_get_data(vc);
unsigned int mpty_ids;
+ GSList *n;
+ struct ofono_call *nc;
+ unsigned int num_active = 0;
+ unsigned int num_held = 0;
if (!ok)
return;
@@ -1142,6 +1146,22 @@ static void hfp_clcc_cb(gboolean ok, GAtResult *result, gpointer user_data)
g_slist_foreach(vd->calls, voicecall_notify, vc);
ofono_voicecall_mpty_hint(vc, mpty_ids);
+
+ n = vd->calls;
+
+ while (n) {
+ nc = n->data;
+
+ if (nc->status == CALL_STATUS_ACTIVE)
+ num_active++;
+ else if (nc->status == CALL_STATUS_HELD)
+ num_held++;
+
+ n = n->next;
+ }
+
+ if ((num_active > 1 || num_held > 1) && !vd->clcc_source)
+ vd->clcc_source = g_timeout_add(POLL_CLCC_INTERVAL, poll_clcc, vc);
}
static void hfp_voicecall_initialized(gboolean ok, GAtResult *result,
--
1.7.11.7
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] Connecting a phone with mpty call does not trigger CLCC polling
2015-06-03 17:25 [PATCH v2] Connecting a phone with mpty call does not trigger CLCC polling Kuba Pawlak
@ 2015-06-04 21:19 ` Denis Kenzior
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2015-06-04 21:19 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 376 bytes --]
Hi Kuba,
On 06/03/2015 12:25 PM, Kuba Pawlak wrote:
> If there is more then one active or held call, we are in mpty calls.
> We won't get indicator update if any of them is released by CHLD=1x.
> So we have to poll it.
> ---
> drivers/hfpmodem/voicecall.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
Applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-04 21:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-03 17:25 [PATCH v2] Connecting a phone with mpty call does not trigger CLCC polling Kuba Pawlak
2015-06-04 21:19 ` Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.