aboutsummaryrefslogtreecommitdiffstats
path: root/src/vat/api_format.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vat/api_format.c')
-rw-r--r--src/vat/api_format.c34
1 files changed, 23 insertions, 11 deletions
diff --git a/src/vat/api_format.c b/src/vat/api_format.c
index f7e076764aa..4c43fcfaa20 100644
--- a/src/vat/api_format.c
+++ b/src/vat/api_format.c
@@ -1302,18 +1302,30 @@ static void vl_api_show_version_reply_t_handler
if (retval >= 0)
{
+ char *s;
char *p = (char *) &mp->program;
- errmsg (" program: %s\n",
- vl_api_from_api_string ((vl_api_string_t *) p));
- p += vl_api_string_len ((vl_api_string_t *) p) + sizeof (u32);
- errmsg (" version: %s\n",
- vl_api_from_api_string ((vl_api_string_t *) p));
- p += vl_api_string_len ((vl_api_string_t *) p) + sizeof (u32);
- errmsg (" build date: %s\n",
- vl_api_from_api_string ((vl_api_string_t *) p));
- p += vl_api_string_len ((vl_api_string_t *) p) + sizeof (u32);
- errmsg ("build directory: %s\n",
- vl_api_from_api_string ((vl_api_string_t *) p));
+
+ s = vl_api_from_api_string_c ((vl_api_string_t *) p);
+ errmsg (" program: %s\n", s);
+ free (s);
+
+ p +=
+ vl_api_string_len ((vl_api_string_t *) p) + sizeof (vl_api_string_t);
+ s = vl_api_from_api_string_c ((vl_api_string_t *) p);
+ errmsg (" version: %s\n", s);
+ free (s);
+
+ p +=
+ vl_api_string_len ((vl_api_string_t *) p) + sizeof (vl_api_string_t);
+ s = vl_api_from_api_string_c ((vl_api_string_t *) p);
+ errmsg (" build date: %s\n", s);
+ free (s);
+
+ p +=
+ vl_api_string_len ((vl_api_string_t *) p) + sizeof (vl_api_string_t);
+ s = vl_api_from_api_string_c ((vl_api_string_t *) p);
+ errmsg ("build directory: %s\n", s);
+ free (s);
}
vam->retval = retval;
vam->result_ready = 1;