From 6a663c3a48ee3ce12cda2fa9ceeb1e15a90ae745 Mon Sep 17 00:00:00 2001 From: Torgny Johansson Date: Mon, 17 May 2010 21:59:58 -0700 Subject: [PATCH] mbm: catch *E2NAP error codes too --- plugins/mm-modem-mbm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/mm-modem-mbm.c b/plugins/mm-modem-mbm.c index 103e5bc0..10be0be8 100644 --- a/plugins/mm-modem-mbm.c +++ b/plugins/mm-modem-mbm.c @@ -766,6 +766,11 @@ grab_port (MMModem *modem, regex = g_regex_new ("\\r\\n\\*E2NAP: (\\d)\\r\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); mm_at_serial_port_add_unsolicited_msg_handler (MM_AT_SERIAL_PORT (port), regex, mbm_e2nap_received, modem, NULL); g_regex_unref (regex); + + /* Catch the extended error status bit of the command too */ + regex = g_regex_new ("\\r\\n\\*E2NAP: (\\d),.*\\r\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); + mm_at_serial_port_add_unsolicited_msg_handler (MM_AT_SERIAL_PORT (port), regex, mbm_e2nap_received, modem, NULL); + g_regex_unref (regex); } regex = g_regex_new ("\\r\\n\\*EMRDY: \\d\\r\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);