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
This commit is contained in:
Aleksander Morgado
2019-10-14 15:54:56 +02:00
parent 089faef88c
commit 1a17996ccb

View File

@@ -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",