From 1d6664e090f883a4971a548f6c7cf07896238309 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Sat, 20 May 2017 16:50:52 +0200 Subject: [PATCH] vtysh: fix autocompletion API misuse I forgot to update this call when I changed cmd_variable_handler_register to take an array... Signed-off-by: David Lamparter --- vtysh/vtysh.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 19b8f2fd8b..2eee7a6897 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -3239,11 +3239,15 @@ static void vtysh_autocomplete(vector comps, struct cmd_token *token) vtysh_ac_line, comps); } -static const struct cmd_variable_handler vtysh_var_handler = { +static const struct cmd_variable_handler vtysh_var_handler[] = { + { /* match all */ .tokenname = NULL, .varname = NULL, .completions = vtysh_autocomplete + }, { + .completions = NULL + } }; void @@ -3256,7 +3260,7 @@ vtysh_init_vty (void) /* Initialize commands. */ cmd_init (0); - cmd_variable_handler_register(&vtysh_var_handler); + cmd_variable_handler_register(vtysh_var_handler); /* Install nodes. */ install_node (&bgp_node, NULL); -- 2.39.5