Hi Patrik,

On Fri, Jul 15, 2011 at 03:13:16PM +0300, [email protected] wrote:
> From: Patrik Flykt <[email protected]>
> 
> A session needs to be online before a VPN service is connected.
> A session must define other bearer types that provide a network
> connection in addition to the VPN one. The easiest way to do
> this is by setting 'AllowedBearers' array to 'vpn', '*'.
> ---
>  src/session.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/src/session.c b/src/session.c
> index 417b698..e4c2081 100644
> --- a/src/session.c
> +++ b/src/session.c
> @@ -824,6 +824,12 @@ static void select_and_connect(struct connman_session 
> *session,
>                       break;
>               case CONNMAN_SERVICE_STATE_IDLE:
>               case CONNMAN_SERVICE_STATE_DISCONNECT:
> +                     if (info->online == FALSE &&
> +                             connman_service_get_type(entry->service) ==
> +                             CONNMAN_SERVICE_TYPE_VPN) {
> +                             entry = NULL;
> +                             break;
> +                     }

Just a minor nitpick: Could you indent the second line of the if statemant
one more? Then it's clearer to identify the body of the "if" context.

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

Reply via email to