Hi,
On Tue, 2013-10-01 at 13:20 +0300, Jukka Rissanen wrote:
> > +static gboolean run_vpn_auto_connect(gpointer data) {
> > + GList *list;
> > +
> > + vpn_autoconnect_timeout = 0;
> > +
> > + for (list = service_list; list; list = list->next) {
> > + struct connman_service *service = list->data;
> > + bool need_split = false;
> > + int res;
> > +
> > + if (service->type != CONNMAN_SERVICE_TYPE_VPN)
> > + continue;
> > +
> > + if (is_connected(service) || is_connecting(service)) {
> > + if (!service->do_split_routing)
> > + need_split = true;
>
> There can be multiple services connecting/connected at the same time.
> Would that change how need_split is set?
The connecting/connected VPN services are handled by this if() statement
whereby the need for split routing is checked and...
> > + continue;
> > + }
...the next possible VPN is looked at with the continue; above. Non-VPN
services don't have split routing capabilities so they need not be
checked.
> > +
> > + if (is_ignore(service) || !service->favorite)
> > + continue;
> > +
> > + if (need_split && !service->do_split_routing) {
> > + DBG("service %p no split routing", service);
> > + continue;
> > + }
> > +
> > + DBG("service %p %s %s", service, service->name,
> > + (service->do_split_routing) ?
>
> No need for () above
True, copy-paste error...
Cheers,
Patrik
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman