hfpmodem: Call ofono_voicecall_mpty_hint as needed

This commit is contained in:
Denis Kenzior 2013-09-10 10:58:14 -05:00
parent 0026ae3fb7
commit a4a170e1ea
1 changed files with 7 additions and 2 deletions

View File

@ -213,11 +213,12 @@ static void clcc_poll_cb(gboolean ok, GAtResult *result, gpointer user_data)
unsigned int num_active = 0;
unsigned int num_held = 0;
GSList *notify_calls = NULL;
unsigned int mpty_ids;
if (!ok)
return;
calls = at_util_parse_clcc(result);
calls = at_util_parse_clcc(result, &mpty_ids);
n = calls;
o = vd->calls;
@ -281,6 +282,8 @@ static void clcc_poll_cb(gboolean ok, GAtResult *result, gpointer user_data)
g_slist_foreach(notify_calls, voicecall_notify, vc);
g_slist_free(notify_calls);
ofono_voicecall_mpty_hint(vc, mpty_ids);
g_slist_foreach(vd->calls, (GFunc) g_free, NULL);
g_slist_free(vd->calls);
@ -1097,13 +1100,15 @@ 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;
if (!ok)
return;
vd->calls = at_util_parse_clcc(result);
vd->calls = at_util_parse_clcc(result, &mpty_ids);
g_slist_foreach(vd->calls, voicecall_notify, vc);
ofono_voicecall_mpty_hint(vc, mpty_ids);
}
static void hfp_voicecall_initialized(gboolean ok, GAtResult *result,