summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/client/test.c
diff options
context:
space:
mode:
authorAndrey "Zed" Zaikin <zed.0xff@gmail.com>2018-04-09 16:42:42 +0300
committerMarco Varlese <marco.varlese@suse.de>2018-04-11 14:44:53 +0000
commit334167f290cb1f9f8eb19423648075b5048fb0a3 (patch)
tree439c8540a9b5ae52a8693090bc5101a72f3c683c /src/vpp-api/client/test.c
parent13c08184c3fb77a54e8d7e46cb45f091cc71fcc3 (diff)
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>
Diffstat (limited to 'src/vpp-api/client/test.c')
-rw-r--r--src/vpp-api/client/test.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/vpp-api/client/test.c b/src/vpp-api/client/test.c
index 020115d90bb..c1b3808a5f5 100644
--- a/src/vpp-api/client/test.c
+++ b/src/vpp-api/client/test.c
@@ -62,13 +62,12 @@ volatile u16 result_msg_id;
-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 @@ int main (int argc, char ** argv)
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);