aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2019-10-14 15:54:56 +0200
committerAleksander Morgado <aleksander@aleksander.es>2019-10-14 15:54:56 +0200
commit1a17996ccb3560c29e2a27c596ad0e9c7bbaaa61 (patch)
treeb70c75139c2b8ae925f7c4e9d73fa77b05be2fe0 /src
parent089faef88cfa5347e209e46cb5990f21648c26a2 (diff)
iface-modem-voice: ignore unknown calls reported as terminated
If the full list reporting includes calls in terminated state (e.g. on modems managed by the Simtech plugin), then ignore those no longer known to us, because it just means that they have already been processed. <debug> [1571060859.227759] (ttyUSB2): <-- '<CR><LF>+CLCC: 1,0,6,0,0,"639335936",129<CR><LF>' <debug> [1571060859.227890] Reported 1 ongoing calls <debug> [1571060859.227913] call at index 1: direction outgoing, state terminated, number 639335936 <debug> [1571060859.227946] call info matched (matched direction/state no, matched index yes, matched terminated no) with call at '/org/freedesktop/ModemManager1/Call/1' <debug> [1571060859.227963] state updated: terminated <info> [1571060859.227978] Call state changed: dialing -> terminated (unknown) <debug> [1571060859.228173] (ttyUSB3): <-- '<CR><LF>+CLCC: 1,0,6,0,0,"639335936",129<CR><LF>' <debug> [1571060859.228234] Reported 1 ongoing calls <debug> [1571060859.228251] call at index 1: direction outgoing, state terminated, number 639335936 <warn> [1571060859.228274] unexpected outgoing call to number '639335936' report2ed in call list: state terminated
Diffstat (limited to 'src')
-rw-r--r--src/mm-iface-modem-voice.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mm-iface-modem-voice.c b/src/mm-iface-modem-voice.c
index bcd8dc1a..30c9abe7 100644
--- a/src/mm-iface-modem-voice.c
+++ b/src/mm-iface-modem-voice.c
@@ -355,6 +355,11 @@ mm_iface_modem_voice_report_all_calls (MMIfaceModemVoice *self,
for (l = ctx.call_info_list; l; l = g_list_next (l)) {
MMCallInfo *call_info = (MMCallInfo *)(l->data);
+ /* Ignore unknown terminated calls, because these be due to an already
+ * processed event. */
+ if (call_info->state == MM_CALL_STATE_TERMINATED)
+ continue;
+
if (call_info->direction == MM_CALL_DIRECTION_OUTGOING) {
mm_warn ("unexpected outgoing call to number '%s' reported in call list: state %s",
call_info->number ? call_info->number : "n/a",