diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2019-10-15 10:40:11 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2019-10-15 11:14:40 +0200 |
commit | 345922caa10fc86dad181ccd83239af1f43fd30e (patch) | |
tree | 1900b7bc68b9c0c72044fb17cb5766d1c000cca6 /plugins/simtech/mm-modem-helpers-simtech.c | |
parent | 395b22178c4f6dd24d552e82d2d46dfb24c65297 (diff) |
simtech: handle non-standard '+CRING' URCs
The SIM7600E ends up emitting these URCs with too many <CR>s, and the
generic +CRING handler doesn't catch them, interfering with other
actions, e.g.:
$ sudo mmcli --call 1 --accept
error: couldn't accept the call: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Failed: Couldn't accept the call: Unhandled response '+CRING: VOICE
+CRING: VOICE''
Diffstat (limited to 'plugins/simtech/mm-modem-helpers-simtech.c')
-rw-r--r-- | plugins/simtech/mm-modem-helpers-simtech.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/simtech/mm-modem-helpers-simtech.c b/plugins/simtech/mm-modem-helpers-simtech.c index 5926c44f..331853d8 100644 --- a/plugins/simtech/mm-modem-helpers-simtech.c +++ b/plugins/simtech/mm-modem-helpers-simtech.c @@ -148,3 +148,16 @@ out: return TRUE; } + +/*****************************************************************************/ + +/* + * Using TWO <CR> instead of one... + * <CR><CR><LF>+CRING: VOICE<CR><CR><LF> + */ +GRegex * +mm_simtech_get_cring_urc_regex (void) +{ + return g_regex_new ("(?:\\r)+\\n\\+CRING:\\s*(\\S+)(?:\\r)+\\n", + G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); +} |