diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2018-07-03 15:03:31 +0200 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2018-10-16 17:09:21 +0000 |
commit | 2b85d27fc00ccbe34a2dc9e2c679fa273967c7cb (patch) | |
tree | 64f7dc97126abced0ffaf0d7b42856d6c347b570 /src/mm-broadband-modem.c | |
parent | b2d859e37084099295cb96725e7e9f03b81dc84f (diff) |
iface-modem-voice: simplify reporting new incoming calls
Allow creating a new incoming call object also when we receive +CLIP,
so that we can have the remote caller number as soon as the object is
created.
Diffstat (limited to 'src/mm-broadband-modem.c')
-rw-r--r-- | src/mm-broadband-modem.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index ddbb8205..92c87e45 100644 --- a/src/mm-broadband-modem.c +++ b/src/mm-broadband-modem.c @@ -6928,7 +6928,7 @@ ring_received (MMPortSerialAt *port, MMBroadbandModem *self) { mm_dbg ("Ringing"); - mm_iface_modem_voice_incoming_call (MM_IFACE_MODEM_VOICE (self)); + mm_iface_modem_voice_report_incoming_call (MM_IFACE_MODEM_VOICE (self), NULL); } static void @@ -6936,7 +6936,6 @@ cring_received (MMPortSerialAt *port, GMatchInfo *info, MMBroadbandModem *self) { - /* The match info gives us in which storage the index applies */ gchar *str; /* We could have "VOICE" or "DATA". Now consider only "VOICE" */ @@ -6945,7 +6944,7 @@ cring_received (MMPortSerialAt *port, mm_dbg ("Ringing (%s)", str); g_free (str); - mm_iface_modem_voice_incoming_call (MM_IFACE_MODEM_VOICE (self)); + mm_iface_modem_voice_report_incoming_call (MM_IFACE_MODEM_VOICE (self), NULL); } static void @@ -6953,24 +6952,11 @@ clip_received (MMPortSerialAt *port, GMatchInfo *info, MMBroadbandModem *self) { - /* The match info gives us in which storage the index applies */ gchar *str; str = mm_get_string_unquoted_from_match_info (info, 1); - - if (str) { - guint validity = 0; - guint type = 0; - - mm_get_uint_from_match_info (info, 2, &type); - mm_get_uint_from_match_info (info, 3, &validity); - - mm_dbg ("Caller ID received: number '%s', type '%d', validity '%d'", str, type, validity); - - mm_iface_modem_voice_update_incoming_call_number (MM_IFACE_MODEM_VOICE (self), str, type, validity); - - g_free (str); - } + mm_iface_modem_voice_report_incoming_call (MM_IFACE_MODEM_VOICE (self), str); + g_free (str); } static void |