---
 src/provider.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/provider.c b/src/provider.c
index bbd462e..8f1862e 100644
--- a/src/provider.c
+++ b/src/provider.c
@@ -571,11 +571,12 @@ int __connman_provider_create_and_connect(DBusMessage 
*msg)
                        err = -EOPNOTSUPP;
                        goto unref;
                }
-       }
 
-       err = __connman_service_connect(provider->vpn_service);
-       if (err < 0 && err != -EINPROGRESS)
-               goto failed;
+               err = __connman_service_connect(provider->vpn_service);
+               if (err < 0 && err != -EINPROGRESS)
+                       goto failed;
+       } else
+               DBG("provider already connected");
 
        service_path = __connman_service_get_path(provider->vpn_service);
        g_dbus_send_reply(connection, msg,
-- 
1.7.1

_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to