stats: check if stats vector entry is empty 45/38545/3
authorOle Troan <ot@cisco.com>
Thu, 23 Mar 2023 21:09:51 +0000 (22:09 +0100)
committerAndrew Yourtchenko <ayourtch@gmail.com>
Mon, 17 Apr 2023 14:04:06 +0000 (14:04 +0000)
commit22ca0d03dbc82c3eb9ccd995aaef3ae924f67b97
tree077fdcdfc3bbe0e87b25f32c42b7fb563aabb923
parent003330c55a0e55cfabf2384dc310bd1c0e0254b9
stats: check if stats vector entry is empty

When a stats entry is removed it is marked empty.
The stats client did not check for that and returned an empty string.
This resulted in blank lines in vpp_get_stats. Fix by returning null instead
and checking value.

Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I08a39ba3ef4421bf275747a6300f97fe36791b50
src/vpp-api/client/stat_client.c
src/vpp/app/vpp_get_stats.c