Re: [PATCH 2/6] gemalto: support ALS3 in gemalto's plugin

2018-03-19 Thread Denis Kenzior
Hi Gabriel, On 03/19/2018 10:15 AM, Gabriel Lucas wrote: Force serial port opening options Wait for modem to be ready to start initializing it Handle LTE --- plugins/gemalto.c | 107 -- 1 file changed, 95 insertions(+), 12 deletions(-)

[PATCH 2/6] gemalto: support ALS3 in gemalto's plugin

2018-03-19 Thread Gabriel Lucas
Force serial port opening options Wait for modem to be ready to start initializing it Handle LTE --- plugins/gemalto.c | 107 -- 1 file changed, 95 insertions(+), 12 deletions(-) diff --git a/plugins/gemalto.c b/plugins/gemalto.c index

Re: [PATCH 2/6] gemalto: support ALS3 in gemalto's plugin

2018-03-19 Thread Denis Kenzior
Hi Gabriel, +    if(app == NULL) +    return; Not our coding style.  Also, the "Application" property should not disappear under you, so I would leave this check out. Is it like this : /* foo bar  * bar */ or /*  * foo bar  * bar */ ? For multi-line comments it the latter. See

Re: [PATCH 2/6] gemalto: support ALS3 in gemalto's plugin

2018-03-19 Thread Gabriel Lucas
Hi Denis, On 16/03/2018 17:08, Denis Kenzior wrote: + +static void gemalto_modem_ready(GAtResult *result, gpointer user_data) +{ +    struct ofono_modem *modem = user_data; +    struct gemalto_data *data = ofono_modem_get_data(modem); +    const char *app = ofono_modem_get_string(modem,

Re: [PATCH 2/6] gemalto: support ALS3 in gemalto's plugin

2018-03-16 Thread Denis Kenzior
Hi Gabriel, @@ -300,29 +322,24 @@ static int gemalto_hardware_monitor_enable(struct ofono_modem *modem) return 0; } -static int gemalto_enable(struct ofono_modem *modem) +static void gemalto_initialize(struct ofono_modem *modem) { struct gemalto_data *data =

[PATCH 2/6] gemalto: support ALS3 in gemalto's plugin

2018-03-16 Thread Gabriel Lucas
Force serial port opening options Wait for modem to be ready to start initializing it Handle LTE --- plugins/gemalto.c | 107 -- 1 file changed, 95 insertions(+), 12 deletions(-) diff --git a/plugins/gemalto.c b/plugins/gemalto.c index

[PATCH 2/6] gemalto: support ALS3 in gemalto's plugin

2018-03-16 Thread Gabriel Lucas
Force serial port opening options Wait for modem to be ready to start initializing it Handle LTE --- plugins/gemalto.c | 106 +++--- 1 file changed, 94 insertions(+), 12 deletions(-) diff --git a/plugins/gemalto.c b/plugins/gemalto.c index

[PATCH 2/6] gemalto: support ALS3 in gemalto's plugin

2018-03-16 Thread Gabriel Lucas
Force serial port opening options Wait for modem to be ready to start initializing it Handle LTE --- plugins/gemalto.c | 106 +++--- 1 file changed, 94 insertions(+), 12 deletions(-) diff --git a/plugins/gemalto.c b/plugins/gemalto.c index

Re: [PATCH 2/6] gemalto: support ALS3 in gemalto's plugin

2018-03-16 Thread Denis Kenzior
Hi Gabriel,   { >>>   struct gemalto_data *data = ofono_modem_get_data(modem);   const char *app, *mdm;   -    DBG("%p", modem); +    /* Close devices */ +    g_at_chat_unref(data->mdm); +    g_at_chat_unref(data->app); + Why would you close both devices?  It is unnecessary,

Re: [PATCH 2/6] gemalto: support ALS3 in gemalto's plugin

2018-03-16 Thread Gabriel Lucas
Hi Denis, On 15/03/2018 18:11, Denis Kenzior wrote: No // please, use /* */.  This is C code ;) Fixed. I've just learned it was not ANSI C :). You leak options here in case channel == NULL.  The typical pattern is to call g_hash_table_destroy(options) right after g_at_tty_open.  See other

[PATCH 2/6] gemalto: support ALS3 in gemalto's plugin

2018-03-12 Thread Gabriel Lucas
Force serial port opening options Wait for modem to be ready to start initializing it Handle LTE --- plugins/gemalto.c | 105 ++ 1 file changed, 99 insertions(+), 6 deletions(-) diff --git a/plugins/gemalto.c b/plugins/gemalto.c index