Hi Alok,

On 03/21/2012 04:09 PM, alok barsode wrote:
Hi,

I was looking at service_indicate_state(). Here is the snippet from it if
the state is DISCONNECTED

         } else if (new_state == CONNMAN_SERVICE_STATE_DISCONNECT) {
def_service = get_default();

         if (__connman_notifier_count_connected() == 0&&
                         def_service != NULL&&
                                 def_service->provider != NULL)

This looks like a safety measure. If there are no technologies connected but we have still VPN service around, we disconnect it.
The technology count is not incremented/decremented for VPN services.


Cheers,
Jukka



__connman_provider_disconnect(def_service->provider);

                 default_changed();

__connman_wispr_stop(service);

__connman_wpad_stop(service);

         update_nameservers(service);
                 dns_changed(service);
domain_changed(service);

                 __connman_timeserver_stop();

__connman_notifier_disconnect(service->type);

                 /*


                  * Previous services which are connected and which states


                  * are set to online should reset relevantly ipconfig_state


                  * to ready so wispr/portal will be rerun on those


                  */
                 downgrade_connected_services();
         }

Here,  __connman_notifier_count_connected() is called before
  __connman_notifier_disconnect(service->type). The count is checked before
it is decremented. Also if the connected count for the current service type
is 0, why does it disconnect the default service's provider?
e.g : if default service is ethernet, and connected count for wifi goes to
0, it will disconnect the provider for ethernet.

This is based of pure code reading, i have not really tested this. but it
seems like a bug to me.

Cheers,
Alok.
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman


_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to