summaryrefslogtreecommitdiff
path: root/vpn
diff options
context:
space:
mode:
authorchleun.moon <chleun.moon@samsung.com>2017-06-07 18:55:07 +0900
committerchleun.moon <chleun.moon@samsung.com>2017-06-07 18:56:18 +0900
commit1f55a40537fef3d325737dd4fb06539d9f8e1fb9 (patch)
tree5c41b41025f5b9f85aa793ba68994a8b1efb139b /vpn
parent4bab77a61ae220b590cf34cd0003f0606304bf5e (diff)
downloadconnman-1f55a40537fef3d325737dd4fb06539d9f8e1fb9.tar.gz
connman-1f55a40537fef3d325737dd4fb06539d9f8e1fb9.tar.bz2
connman-1f55a40537fef3d325737dd4fb06539d9f8e1fb9.zip
[IPSec] Unlink UDS file for charon when charon is killedsubmit/tizen/20170612.082510accepted/tizen/unified/20170612.171441
Change-Id: I2b6475c373bbf7410ecd779bc134f632ced626d5 Signed-off-by: cheoleun <chleun.moon@samsung.com>
Diffstat (limited to 'vpn')
-rw-r--r--vpn/plugins/ipsec.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/vpn/plugins/ipsec.c b/vpn/plugins/ipsec.c
index 70f3433a..b33432e0 100644
--- a/vpn/plugins/ipsec.c
+++ b/vpn/plugins/ipsec.c
@@ -1112,6 +1112,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,
@@ -1130,7 +1137,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)