summaryrefslogtreecommitdiffstats
path: root/drivers/hfpmodem/voicecall.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2009-12-04 16:51:53 -0600
committerDenis Kenzior <denkenz@gmail.com>2009-12-04 16:52:32 -0600
commit18e8c906c56ab4f1df47f655296203b3f52154df (patch)
treea93fbd7182a5b6c47b54b5c194b2956a201b2c62 /drivers/hfpmodem/voicecall.c
parent62df556f289bd250ebf648045ce8dfe17f4aa83b (diff)
downloadofono-18e8c906c56ab4f1df47f655296203b3f52154df.tar.bz2
Make sure to list calls in HFP voicecall driver
Diffstat (limited to 'drivers/hfpmodem/voicecall.c')
-rw-r--r--drivers/hfpmodem/voicecall.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/hfpmodem/voicecall.c b/drivers/hfpmodem/voicecall.c
index 7899ba67..6693280f 100644
--- a/drivers/hfpmodem/voicecall.c
+++ b/drivers/hfpmodem/voicecall.c
@@ -927,6 +927,21 @@ static void ciev_notify(GAtResult *result, gpointer user_data)
ciev_callheld_notify(vc, value);
}
+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);
+ GSList *l;
+
+ if (!ok)
+ return;
+
+ vd->calls = at_util_parse_clcc(result);
+
+ for (l = vd->calls; l; l = l->next)
+ ofono_voicecall_notify(vc, l->data);
+}
+
static void hfp_voicecall_initialized(gboolean ok, GAtResult *result,
gpointer user_data)
{
@@ -944,6 +959,9 @@ static void hfp_voicecall_initialized(gboolean ok, GAtResult *result,
no_carrier_notify, FALSE, vc, NULL);
ofono_voicecall_register(vc);
+
+ /* Populate the call list */
+ g_at_chat_send(vd->chat, "AT+CLCC", clcc_prefix, hfp_clcc_cb, vc, NULL);
}
static int hfp_voicecall_probe(struct ofono_voicecall *vc, unsigned int vendor,