X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvpp-api%2Fvapi%2Fvapi.c;h=ca46f8d3b84699430e6bd194615ceb26a88a4ae7;hb=5f0106a76fbc3792781a81dedb5a7e41813430d3;hp=fbe04c187f303f97a6b6f319f53941e332089036;hpb=8d4db8bfb4b0d2ecd8bef37fa0650b779f03f1ef;p=vpp.git diff --git a/src/vpp-api/vapi/vapi.c b/src/vpp-api/vapi/vapi.c index fbe04c187f3..ca46f8d3b84 100644 --- 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_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);