Hi Patrik,
On 01/09/2014 02:39 PM, Patrik Flykt wrote:
>
> Hi,
>
> On Fri, 2013-12-13 at 09:34 +0100, Daniel Wagner wrote:
>> From: Daniel Wagner <[email protected]>
>>
>> A Service should not be ignored when a Session wants a connection.
>> Since this a changes the meaming of AutoConnect of a Service
>> we use the SessionAutoConnectMode to protect the normal operation
>> mode.
>> ---
>> src/service.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/src/service.c b/src/service.c
>> index 6e0b27f..9d03b1a 100644
>> --- a/src/service.c
>> +++ b/src/service.c
>> @@ -3451,6 +3451,13 @@ static bool is_ignore(struct connman_service *service)
>> if (!is_ipconfig_usable(service))
>> return true;
>>
>> + if (connman_setting_get_bool("SessionAutoConnectMode")) {
>> + if (__connman_session_wants_connection(service))
>
> Somehow I get the feeling that __connman_session_wants_connection() is
> already handled by patch 5/12 with the change:
>
> + active_session = __connman_session_active_sessions(service);
> + if (autoconnecting && !active_session) {
>
> With that in mind...
This is not the same.
__connman_session_wants_connection()
return session->info->connect
The first function returns true when the user has pressed
Session.Connect() and given service matches the configuration.
__connman_session_active_sessions()
return session->active
The second function returns true when only when a session is active (has
a valid configuration) and this service is part of the session.
>> + return false;
>> +
>> + return true;
>> + }
>> +
>> return false;
>> }
>
> ...I'm missing out on the use case where 'return false;' above would
> kick in.
For example when 'AllowedBearers = ethernet' and given service is of
type wireless then we return false.
cheers,
daniel
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman