X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvlibmemory%2Fvlib_api_cli.c;h=69c4f92df4ac2c1fd3bef491a29d79fc669285c7;hb=refs%2Fchanges%2F52%2F17652%2F2;hp=d4d7c1c63dc5ce56a8a3dd89e4040846c97fea3a;hpb=e86a8edd3c14fb41ace2a12efd17bc7772bf623f;p=vpp.git diff --git a/src/vlibmemory/vlib_api_cli.c b/src/vlibmemory/vlib_api_cli.c index d4d7c1c63dc..69c4f92df4a 100644 --- a/src/vlibmemory/vlib_api_cli.c +++ b/src/vlibmemory/vlib_api_cli.c @@ -535,7 +535,7 @@ vl_msg_api_process_file (vlib_main_t * vm, u8 * filename, /* Copy the buffer (from the read-only mmap'ed file) */ vec_validate (tmpbuf, size - 1 + sizeof (uword)); clib_memcpy (tmpbuf + sizeof (uword), msg, size); - memset (tmpbuf, 0xf, sizeof (uword)); + clib_memset (tmpbuf, 0xf, sizeof (uword)); /* * Endian swap if needed. All msg data is supposed to be @@ -621,13 +621,13 @@ vl_msg_api_process_file (vlib_main_t * vm, u8 * filename, if (msg_id < vec_len (am->msg_print_handlers) && am->msg_print_handlers[msg_id] && cfgp->replay_enable) { - void (*handler) (void *); + void (*handler) (void *, vlib_main_t *); handler = (void *) am->msg_handlers[msg_id]; if (!am->is_mp_safe[msg_id]) vl_msg_api_barrier_sync (); - (*handler) (tmpbuf + sizeof (uword)); + (*handler) (tmpbuf + sizeof (uword), vm); if (!am->is_mp_safe[msg_id]) vl_msg_api_barrier_release (); } @@ -721,7 +721,7 @@ api_trace_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "Error while writing start of buffer trace to file\n"); else if (rv < 0) - vlib_cli_output (vm, "Unkown error while saving: %d", rv); + vlib_cli_output (vm, "Unknown error while saving: %d", rv); else vlib_cli_output (vm, "API trace saved to %s\n", chroot_filename); vec_free (chroot_filename);