Re: [PATCH 3/3] [connman] ofono: Call set_connected if new configuration received while connected

2015-01-28 Thread Pasi Sjöholm

On 28.01.2015 14:13, Patrik Flykt wrote:

I meant that why isn't the whole message parsed through first, i.e. why
is set_connected() called immediately after extracting IPv4/IPv6
settings and not after all the properties have been handled.


/*
 * oFono guarantees the ordering of Settings and
 * Active. Settings will always be send before Active = True.
 * That means we don't have to order here.
 */

set_connected never gets called before we have received "Active = 
True"-signal. After that we do not get anymore "Active = True" if 
context is changed, so from where would we know that all properties are 
handled/sent?


And yes.. the both IPv4- and IPv6-settings are sent in separate messages 
as well as the other "properties".


Br,
Pasi



___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman


Re: [PATCH 3/3] [connman] ofono: Call set_connected if new configuration received while connected

2015-01-28 Thread Patrik Flykt
On Wed, 2015-01-28 at 11:27 +, Pasi Sjöholm wrote:
> >Why does set_connected() not wait until all properties are checked?
> 
> 1) RIL signals to ofono that the context is active.
> 2) ofono can't know if there will be additional signals or not, how
> long to to wait for?
> 3) IMO, the changes from signaled changes from ofono should be taken
> in use.

I meant that why isn't the whole message parsed through first, i.e. why
is set_connected() called immediately after extracting IPv4/IPv6
settings and not after all the properties have been handled.

Cheers,

Patrik


___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

RE: [PATCH 3/3] [connman] ofono: Call set_connected if new configuration received while connected

2015-01-28 Thread Pasi Sjöholm
>3) IMO, the changes from signaled changes from ofono should be taken in use.

Sorry, people interrupting me.. :D

3) IMO, the changes signaled from ofono to already active connection should  be 
taken in use. 



Br,
Pasi
___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman
___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman


RE: [PATCH 3/3] [connman] ofono: Call set_connected if new configuration received while connected

2015-01-28 Thread Pasi Sjöholm
Hi,

>> Ofono can signal new configuration while context is active and therefore
>> set_connected needs to be called.
>> --- a/plugins/ofono.c
>> +++ b/plugins/ofono.c
>> +
>> + if (modem->active && modem->context->index > -1)
>> + set_connected(modem);
>>   } else if (g_str_equal(key, "IPv6.Settings")) {
>>   DBG("%s IPv6.Settings", modem->path);
>>
>>   extract_ipv6_settings(&value, modem->context);
>> +
>> + if (modem->active && modem->context->index > -1)
>> + set_connected(modem);
>Why does set_connected() not wait until all properties are checked?

1) RIL signals to ofono that the context is active.
2) ofono can't know if there will be additional signals or not, how long to to 
wait for?
3) IMO, the changes from signaled changes from ofono should be taken in use.

Br,
Pasi
___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman


Re: [PATCH 3/3] [connman] ofono: Call set_connected if new configuration received while connected

2015-01-21 Thread Patrik Flykt

Hi,

On Wed, 2015-01-07 at 14:43 +0200, pasi.sjoh...@jolla.com wrote:
> From: Pasi Sjöholm 
> 
> Ofono can signal new configuration while context is active and therefore
> set_connected needs to be called.
> ---
>  plugins/ofono.c | 6 ++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/plugins/ofono.c b/plugins/ofono.c
> index 16d3b41..9db9898 100644
> --- a/plugins/ofono.c
> +++ b/plugins/ofono.c
> @@ -1220,10 +1220,16 @@ static gboolean context_changed(DBusConnection *conn,
>   DBG("%s Settings", modem->path);
>  
>   extract_ipv4_settings(&value, modem->context);
> +
> + if (modem->active && modem->context->index > -1)
> + set_connected(modem);
>   } else if (g_str_equal(key, "IPv6.Settings")) {
>   DBG("%s IPv6.Settings", modem->path);
>  
>   extract_ipv6_settings(&value, modem->context);
> +
> + if (modem->active && modem->context->index > -1)
> + set_connected(modem);
>   } else if (g_str_equal(key, "Active")) {
>   dbus_bool_t active;
>  

Why does set_connected() not wait until all properties are checked?

Cheers,

Patrik

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman