aboutsummaryrefslogtreecommitdiffstats
path: root/src/swanctl/commands/terminate.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2014-10-10 11:42:28 +0200
committerMartin Willi <martin@revosec.ch>2014-10-10 11:43:43 +0200
commitef90d5ab1598cd5d81556ddb18845a7d4dc75d8c (patch)
tree4838a830bb5a1e5b9079655a768e3ee6c2f6587c /src/swanctl/commands/terminate.c
parent05db0f97e3051150a38511fdb35c9d58bb6e989b (diff)
parent7431ad0de54d25c5ac08054972896a48d75f9f70 (diff)
downloadstrongswan-ef90d5ab1598cd5d81556ddb18845a7d4dc75d8c.tar.bz2
strongswan-ef90d5ab1598cd5d81556ddb18845a7d4dc75d8c.tar.xz
Merge branch 'vici-ruby'
Adds a ruby gem for the VICI protocol, along with some documentation improvements and some minor fixes to vici and swanctl.
Diffstat (limited to 'src/swanctl/commands/terminate.c')
-rw-r--r--src/swanctl/commands/terminate.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/swanctl/commands/terminate.c b/src/swanctl/commands/terminate.c
index 689ba4d50..8b3233c89 100644
--- a/src/swanctl/commands/terminate.c
+++ b/src/swanctl/commands/terminate.c
@@ -80,8 +80,9 @@ static int terminate(vici_conn_t *conn)
if (vici_register(conn, "control-log", log_cb, &format) != 0)
{
+ ret = errno;
fprintf(stderr, "registering for log failed: %s\n", strerror(errno));
- return errno;
+ return ret;
}
req = vici_begin("terminate");
if (child)
@@ -108,8 +109,9 @@ static int terminate(vici_conn_t *conn)
res = vici_submit(req, conn);
if (!res)
{
+ ret = errno;
fprintf(stderr, "terminate request failed: %s\n", strerror(errno));
- return errno;
+ return ret;
}
if (format & COMMAND_FORMAT_RAW)
{