summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2013-11-25 18:42:47 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2013-11-25 18:42:47 +0100
commit283c7dfada53a6dee6a8a17ecab492ffafd44b66 (patch)
tree5edfb9df61c3b625967f3c65317f27c5051a8a4d /client
parent736e143fa50607fcd88132291e96089b899af979 (diff)
parent0bb4e37db317a1290bad24fe430cac6569a9bd8c (diff)
Merge branch 'master' into add-path
Diffstat (limited to 'client')
-rw-r--r--client/client.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/client/client.c b/client/client.c
index a9d0096d..b938f344 100644
--- a/client/client.c
+++ b/client/client.c
@@ -137,6 +137,21 @@ submit_server_command(char *cmd)
server_send(cmd);
}
+static inline void
+submit_init_command(char *cmd_raw)
+{
+ char *cmd = cmd_expand(cmd_raw);
+
+ if (!cmd)
+ {
+ cleanup();
+ exit(0);
+ }
+
+ submit_server_command(cmd);
+ free(cmd);
+}
+
void
submit_command(char *cmd_raw)
{
@@ -165,7 +180,7 @@ init_commands(void)
{
/* First transition - client received hello from BIRD
and there is waiting initial command */
- submit_server_command(init_cmd);
+ submit_init_command(init_cmd);
init_cmd = NULL;
return;
}