summaryrefslogtreecommitdiff
path: root/vpn/vpn-config.c
diff options
context:
space:
mode:
Diffstat (limited to 'vpn/vpn-config.c')
-rw-r--r--vpn/vpn-config.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/vpn/vpn-config.c b/vpn/vpn-config.c
index b54fb1c1..728b0763 100644
--- a/vpn/vpn-config.c
+++ b/vpn/vpn-config.c
@@ -235,11 +235,16 @@ static int load_provider(GKeyFile *keyfile, const char *group,
struct vpn_provider *provider;
provider = __vpn_provider_lookup(id);
if (provider != NULL) {
- if (action == REMOVE)
+ if (action == REMOVE) {
__vpn_provider_delete(provider);
+ err = 0;
+ } else {
+ connman_warn("Provider configuration %s "
+ "already exist", id);
+ err = -EALREADY;
+ }
g_free(id);
- err = -EALREADY;
goto err;
}