aboutsummaryrefslogtreecommitdiff
path: root/src/mm-call-list.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mm-call-list.c')
-rw-r--r--src/mm-call-list.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mm-call-list.c b/src/mm-call-list.c
index 81100640..a3b914bb 100644
--- a/src/mm-call-list.c
+++ b/src/mm-call-list.c
@@ -84,10 +84,13 @@ mm_call_list_get_paths (MMCallList *self)
/*****************************************************************************/
MMBaseCall *
-mm_call_list_get_first_ringing_in_call (MMCallList *self)
+mm_call_list_get_first_incoming_call (MMCallList *self,
+ MMCallState incoming_state)
{
GList *l;
+ g_assert (incoming_state == MM_CALL_STATE_RINGING_IN || incoming_state == MM_CALL_STATE_WAITING);
+
for (l = self->priv->list; l; l = g_list_next (l)) {
MMBaseCall *call;
MMCallState state;
@@ -101,7 +104,7 @@ mm_call_list_get_first_ringing_in_call (MMCallList *self)
NULL);
if (direction == MM_CALL_DIRECTION_INCOMING &&
- state == MM_CALL_STATE_RINGING_IN) {
+ state == incoming_state) {
return call;
}
}