summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/service.c5
-rw-r--r--vpn/plugins/ipsec.c9
2 files changed, 10 insertions, 4 deletions
diff --git a/src/service.c b/src/service.c
index 259a497..4f7b9b8 100755
--- a/src/service.c
+++ b/src/service.c
@@ -612,6 +612,8 @@ static int service_load_passphrase(struct connman_service *service)
if (str)
service->passphrase = str;
+ g_key_file_free(keyfile);
+
return 0;
}
@@ -1739,9 +1741,6 @@ int __connman_service_nameserver_append(struct connman_service *service,
return -ENOMEM;
nameservers[len] = g_strdup(nameserver);
- if (!nameservers[len])
- return -ENOMEM;
-
nameservers[len + 1] = NULL;
#ifdef TIZEN_EXT
diff --git a/vpn/plugins/ipsec.c b/vpn/plugins/ipsec.c
index 148a7ed..6862fbc 100644
--- a/vpn/plugins/ipsec.c
+++ b/vpn/plugins/ipsec.c
@@ -1145,6 +1145,13 @@ static void check_vici_socket(struct ipsec_private_data *data)
}
}
+static void ipsec_died(struct connman_task *task, int exit_code, void *user_data)
+{
+ DBG("task %p exit_code %d", task, exit_code);
+ unlink(VICI_DEFAULT_URI);
+ vpn_died(task, exit_code, user_data);
+}
+
static int ipsec_connect(struct vpn_provider *provider,
struct connman_task *task, const char *if_name,
vpn_provider_connect_cb_t cb, const char *dbus_sender,
@@ -1163,7 +1170,7 @@ static int ipsec_connect(struct vpn_provider *provider,
/*
* Start charon daemon using ipsec script of strongSwan.
*/
- err = connman_task_run(task, vpn_died, provider, NULL, NULL, NULL);
+ err = connman_task_run(task, ipsec_died, provider, NULL, NULL, NULL);
if (err < 0) {
connman_error("charon start failed");
if (cb)