stats: create /run/vpp before stat socket bind()
When VPP tries to bind to stats.sock it will complain about non-existing
/run/vpp directory.
/run/vpp is created before cli socket operations are performed.
The same should be done for stat socket.
Ticket: VPP-1708
Type: fix
Change-Id: I53d70939c8125d04a365ac51a6cbf8926dc52adf
Signed-off-by: YohanPipereau <ypiperea@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
diff --git a/src/vlib/unix/cli.c b/src/vlib/unix/cli.c
index fa61c69..22f56c7 100644
--- a/src/vlib/unix/cli.c
+++ b/src/vlib/unix/cli.c
@@ -3120,7 +3120,7 @@
while (i && tmp[--i] != '/')
;
- tmp[i] = 0;
+ tmp[i] = '\0';
if (i)
vlib_unix_recursive_mkdir ((char *) tmp);