aboutsummaryrefslogtreecommitdiffstats
path: root/src/ctrl/control_vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ctrl/control_vty.c')
-rw-r--r--src/ctrl/control_vty.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ctrl/control_vty.c b/src/ctrl/control_vty.c
index ef988892..0dc8bfe0 100644
--- a/src/ctrl/control_vty.c
+++ b/src/ctrl/control_vty.c
@@ -79,9 +79,14 @@ static int config_write_ctrl(struct vty *vty)
return CMD_SUCCESS;
}
+/*! Initialize the VTY configuration for the CTRL interface.
+ * \param[in] ctx UNUSED, only for legacy compatibility
+ * \returns 0 on success; negative on error */
int ctrl_vty_init(void *ctx)
{
- ctrl_vty_ctx = ctx;
+ ctrl_vty_ctx = talloc_named_const(OTC_GLOBAL, 0, "ctrl-vty");
+ if (!ctrl_vty_ctx)
+ return -1;
install_element(CONFIG_NODE, &cfg_ctrl_cmd);
install_node(&ctrl_node, config_write_ctrl);