Re: [PATCH v2] core: process SMS +CGMR response with regex

2015-09-16 Thread Aleksander Morgado
On Wed, Sep 16, 2015 at 12:26 AM, Dan Williams wrote: >> +/* +CMGR: ,,(whitespace) */ >> +/* The and fields are matched, but not currently used >> */ >> +r = g_regex_new >> ("\\+CMGR:\\s*(\\d+)\\s*,([^,]*),\\s*(\\d+)\\s*([^\\r\\n]*)", 0, 0, error); >> +

[PATCH] libmm-glib, simple: add missing introspection annotations to disconnect()

2015-09-16 Thread Krzysztof Kotlenga
--- libmm-glib/mm-modem-simple.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libmm-glib/mm-modem-simple.c b/libmm-glib/mm-modem-simple.c index b96e31d..910f06b 100644 --- a/libmm-glib/mm-modem-simple.c +++ b/libmm-glib/mm-modem-simple.c @@ -294,7 +294,7 @@

Re: [PATCH v2] core: process SMS +CGMR response with regex

2015-09-16 Thread Nick Stevens
On Wed, Sep 16, 2015 at 09:21:48AM +0200, Aleksander Morgado wrote: > On Wed, Sep 16, 2015 at 12:26 AM, Dan Williams wrote: > >> +/* +CMGR: ,,(whitespace) */ > >> +/* The and fields are matched, but not currently > >> used */ > >> +r = g_regex_new > >>

Re: [PATCH v2] core: process SMS +CGMR response with regex

2015-09-16 Thread Nick Stevens
On Tue, Sep 15, 2015 at 05:26:06PM -0500, Dan Williams wrote: > On Tue, 2015-09-15 at 20:15 +, Nick Stevens wrote: > > Variability in the response style from certain modems causes the parsing > > of the +CGMR response to fail. For example, the Telit HE910 inserts an > > empty string ("") in

Re: [PATCH v2] core: process SMS +CGMR response with regex

2015-09-16 Thread Aleksander Morgado
On Wed, Sep 16, 2015 at 3:21 PM, Nick Stevens wrote: >> > + >> > +if (g_regex_match_full (r, reply, strlen (reply), 0, 0, _info, >> > _error)) { >> >> I think you should also just restructure the function with a 'goto' for >> error handling to break out early. Yeah

Re: [PATCH] libmm-glib, simple: add missing introspection annotations to disconnect()

2015-09-16 Thread Aleksander Morgado
On Wed, Sep 16, 2015 at 3:46 PM, Krzysztof Kotlenga wrote: > --- > libmm-glib/mm-modem-simple.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Pushed to git master and mm-1-4, thanks! > diff --git a/libmm-glib/mm-modem-simple.c b/libmm-glib/mm-modem-simple.c