Re: [PATCH] mm-modem-mbm.c: add *E2NAP regexp to catch messages with error codes
- From: Dan Williams <dcbw redhat com>
- To: Torgny Johansson <torgny johansson ericsson com>
- Cc: networkmanager-list gnome org
- Subject: Re: [PATCH] mm-modem-mbm.c: add *E2NAP regexp to catch messages with error codes
- Date: Mon, 17 May 2010 22:00:26 -0700
On Mon, 2010-05-17 at 10:54 +0200, Torgny Johansson wrote:
> Hi!
>
> The following patch adds a new regular expression to be able to catch e2nap unsolicited messages containg an error code e.g. *E2NAP: 0,36.
> Without it, you could get weird responses for "get_imsi" etc where the E2NAP unsolicited message would be included in the response.
Pushed, thanks!
Dan
> Regards
> Torgny Johansson
>
> diff --git a/plugins/mm-modem-mbm.c b/plugins/mm-modem-mbm.c
> index ea7d876..feb3832 100644
> --- a/plugins/mm-modem-mbm.c
> +++ b/plugins/mm-modem-mbm.c
> @@ -847,6 +847,10 @@ 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);
> +
> + 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);
> _______________________________________________
> networkmanager-list mailing list
> networkmanager-list gnome org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]