From db86329abb4ea164b9061a1d6b47f186c6b9b8fb Mon Sep 17 00:00:00 2001 From: Jakub Grajciar Date: Thu, 30 Jan 2020 14:14:15 +0100 Subject: pg: API cleanup Use consistent API types. Type: fix Signed-off-by: Jakub Grajciar Change-Id: Ibf693e4b178d2579bc3afb9653bffc07fbb7dd0a Signed-off-by: Jakub Grajciar --- src/vat/api_format.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/vat') diff --git a/src/vat/api_format.c b/src/vat/api_format.c index da64a8151fd..404f9045ea1 100644 --- a/src/vat/api_format.c +++ b/src/vat/api_format.c @@ -18593,17 +18593,15 @@ api_pg_capture (vat_main_t * vam) } } - u32 name_len = vec_len (pcap_file); /* Construct the API message */ M (PG_CAPTURE, mp); mp->context = 0; mp->interface_id = ntohl (if_id); mp->is_enabled = enable; mp->count = ntohl (count); - mp->pcap_name_length = ntohl (name_len); if (pcap_file_set != 0) { - clib_memcpy (mp->pcap_file_name, pcap_file, name_len); + vl_api_vec_to_api_string (pcap_file, &mp->pcap_file_name); } vec_free (pcap_file); @@ -18641,15 +18639,13 @@ api_pg_enable_disable (vat_main_t * vam) } } - u32 name_len = vec_len (stream_name); /* Construct the API message */ M (PG_ENABLE_DISABLE, mp); mp->context = 0; mp->is_enabled = enable; if (stream_name_set != 0) { - mp->stream_name_length = ntohl (name_len); - clib_memcpy (mp->stream_name, stream_name, name_len); + vl_api_vec_to_api_string (stream_name, &mp->stream_name); } vec_free (stream_name); -- cgit 1.2.3-korg