fix: sample vpp-api C client hangs vpp daemon because of NULL callback
Change-Id: I686254b332a4527cb0cad3c5c0a17ea4c9f40e1d
Signed-off-by: Andrey "Zed" Zaikin <zed.0xff@gmail.com>
diff --git a/src/vpp-api/client/test.c b/src/vpp-api/client/test.c
index 020115d..c1b3808 100644
--- a/src/vpp-api/client/test.c
+++ b/src/vpp-api/client/test.c
@@ -62,13 +62,12 @@
-int
-wrap_vac_callback (char *data, int len)
+void
+wrap_vac_callback (unsigned char *data, int len)
{
//printf("Callback %d\n", len);
result_ready = 1;
result_msg_id = ntohs(*((u16 *)data));
- return (0);
}
int main (int argc, char ** argv)
@@ -77,7 +76,7 @@
vl_api_show_version_t message;
vl_api_show_version_t *mp;
int async = 1;
- int rv = vac_connect("vac_client", NULL, NULL, 32 /* rx queue-length*/);
+ int rv = vac_connect("vac_client", NULL, wrap_vac_callback, 32 /* rx queue-length*/);
if (rv != 0) {
printf("Connect failed: %d\n", rv);