aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/unix/cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib/unix/cli.c')
-rw-r--r--src/vlib/unix/cli.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vlib/unix/cli.c b/src/vlib/unix/cli.c
index 96e22a25313..6c98867253f 100644
--- a/src/vlib/unix/cli.c
+++ b/src/vlib/unix/cli.c
@@ -2886,9 +2886,9 @@ unix_cli_file_add (unix_cli_main_t * cm, char *name, int fd)
* the same new name.
* Then, throw away the old shared name-vector.
*/
- for (i = 0; i < vec_len (vlib_mains); i++)
+ for (i = 0; i < vlib_get_n_threads (); i++)
{
- this_vlib_main = vlib_mains[i];
+ this_vlib_main = vlib_get_main_by_index (i);
if (this_vlib_main == 0)
continue;
n = vlib_get_node (this_vlib_main,