aboutsummaryrefslogtreecommitdiff
path: root/src/mm-call-list.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2018-06-14 15:36:06 +0200
committerDan Williams <dcbw@redhat.com>2018-10-16 17:09:21 +0000
commitbd3b5aca01a3d3102c607b7ca6fab310963ec77c (patch)
tree12f0701ab5575a6aa198f54ba97bbd65298e6763 /src/mm-call-list.c
parent0090124ec0d0d28fa78f5a0dd153e36584a0f171 (diff)
base-call: automatically terminate unanswered incoming calls
Try to automatically detect when the caller finishes the attempt to establish the call.
Diffstat (limited to 'src/mm-call-list.c')
-rw-r--r--src/mm-call-list.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/mm-call-list.c b/src/mm-call-list.c
index b1950e3a..91ccc8d0 100644
--- a/src/mm-call-list.c
+++ b/src/mm-call-list.c
@@ -84,36 +84,33 @@ mm_call_list_get_paths (MMCallList *self)
/*****************************************************************************/
MMBaseCall *
-mm_call_list_get_new_incoming (MMCallList *self)
+mm_call_list_get_first_ringing_in_call (MMCallList *self)
{
- MMBaseCall *call = NULL;
GList *l;
for (l = self->priv->list; l; l = g_list_next (l)) {
-
+ MMBaseCall *call;
MMCallState state;
- MMCallStateReason reason;
- MMCallDirection direct;
+ MMCallDirection direction;
- g_object_get (MM_BASE_CALL (l->data),
- "state", &state,
- "state-reason", &reason,
- "direction", &direct,
+ call = MM_BASE_CALL (l->data);
+
+ g_object_get (call,
+ "state", &state,
+ "direction", &direction,
NULL);
- if (direct == MM_CALL_DIRECTION_INCOMING &&
- state == MM_CALL_STATE_RINGING_IN &&
- reason == MM_CALL_STATE_REASON_INCOMING_NEW ) {
- call = MM_BASE_CALL (l->data);
- break;
+ if (direction == MM_CALL_DIRECTION_INCOMING &&
+ state == MM_CALL_STATE_RINGING_IN) {
+ return call;
}
}
- return call;
+ return NULL;
}
MMBaseCall *
-mm_call_list_get_first_ringing_call (MMCallList *self)
+mm_call_list_get_first_ringing_out_call (MMCallList *self)
{
MMBaseCall *call = NULL;
GList *l;