diff options
author | Damjan Marion <damarion@cisco.com> | 2021-03-26 13:45:37 +0100 |
---|---|---|
committer | Damjan Marion <damarion@cisco.com> | 2021-03-26 16:33:42 +0100 |
commit | f553a2cbbb8cca84ebf033335ebd2cd26dc19d69 (patch) | |
tree | 3705c2c0121769dff96a122cef13886d5f0e5205 /src/vlib/cli.c | |
parent | 6ffb7c61899eb782416cbd2f117042a583f189f7 (diff) |
vlib: introduce vlib_get_elog_main()
Type: improvement
Change-Id: I73383eb15186021cd6527d112da8443a0082f129
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/cli.c')
-rw-r--r-- | src/vlib/cli.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/vlib/cli.c b/src/vlib/cli.c index 85ec6cbc43c..3215a3264f5 100644 --- a/src/vlib/cli.c +++ b/src/vlib/cli.c @@ -575,8 +575,8 @@ vlib_cli_dispatch_sub_commands (vlib_main_t * vm, { u32 c; } *ed; - ed = ELOG_DATA (&vm->elog_main, e); - ed->c = elog_string (&vm->elog_main, "%v", c->path); + ed = ELOG_DATA (vlib_get_elog_main (), e); + ed->c = elog_string (vlib_get_elog_main (), "%v", c->path); } if (!c->is_mp_safe) @@ -607,17 +607,17 @@ vlib_cli_dispatch_sub_commands (vlib_main_t * vm, { u32 c, err; } *ed; - ed = ELOG_DATA (&vm->elog_main, e); - ed->c = elog_string (&vm->elog_main, "%v", c->path); + ed = ELOG_DATA (vlib_get_elog_main (), e); + ed->c = elog_string (vlib_get_elog_main (), "%v", c->path); if (c_error) { vec_add1 (c_error->what, 0); - ed->err = - elog_string (&vm->elog_main, (char *) c_error->what); + ed->err = elog_string (vlib_get_elog_main (), + (char *) c_error->what); _vec_len (c_error->what) -= 1; } else - ed->err = elog_string (&vm->elog_main, "OK"); + ed->err = elog_string (vlib_get_elog_main (), "OK"); } if (c_error) @@ -1547,7 +1547,7 @@ event_logger_trace_command_fn (vlib_main_t * vm, */ if (dispatch || circuit) { - elog_main_t *em = &vm->elog_main; + elog_main_t *em = &vlib_global_main.elog_main; em->n_total_events_disable_limit = em->n_total_events + vec_len (em->event_ring); |