Commit 8137fe6d authored by Ondřej Zajíček's avatar Ondřej Zajíček

Allows shorthands for birdc noninteractive commands.

parent e237b28a
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment