Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
api: vapi: honor non-blocking setting
[vpp.git]
/
src
/
vpp-api
/
vapi
/
vapi.c
diff --git
a/src/vpp-api/vapi/vapi.c
b/src/vpp-api/vapi/vapi.c
index
fbe04c1
..
ca46f8d
100644
(file)
--- a/
src/vpp-api/vapi/vapi.c
+++ b/
src/vpp-api/vapi/vapi.c
@@
-766,7
+766,9
@@
vapi_dispatch_one (vapi_ctx_t ctx)
VAPI_DBG ("vapi_dispatch_one()");
void *msg;
uword size;
VAPI_DBG ("vapi_dispatch_one()");
void *msg;
uword size;
- vapi_error_e rv = vapi_recv (ctx, &msg, &size, SVM_Q_WAIT, 0);
+ svm_q_conditional_wait_t cond =
+ vapi_is_nonblocking (ctx) ? SVM_Q_NOWAIT : SVM_Q_WAIT;
+ vapi_error_e rv = vapi_recv (ctx, &msg, &size, cond, 0);
if (VAPI_OK != rv)
{
VAPI_DBG ("vapi_recv failed with rv=%d", rv);
if (VAPI_OK != rv)
{
VAPI_DBG ("vapi_recv failed with rv=%d", rv);