X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Frmr%2Fnng%2Fsrc%2Frmr_nng.c;fp=src%2Frmr%2Fnng%2Fsrc%2Frmr_nng.c;h=a4b40098411dd05efc5eb1c1c65489483e3ff45e;hb=e21dbee1d382e73d1897f96c0bd450f216389b74;hp=bc3fe107cba3a476cbc35e70a04ea10ffe6e2f3b;hpb=4441a79be9a6f9d1b4ec0111eb0030a8f2e3e5e5;p=ric-plt%2Flib%2Frmr.git diff --git a/src/rmr/nng/src/rmr_nng.c b/src/rmr/nng/src/rmr_nng.c index bc3fe10..a4b4009 100644 --- a/src/rmr/nng/src/rmr_nng.c +++ b/src/rmr/nng/src/rmr_nng.c @@ -883,11 +883,11 @@ extern rmr_mbuf_t* rmr_mt_rcv( void* vctx, rmr_mbuf_t* mbuf, int max_wait ) { chute = &ctx->chutes[0]; // chute 0 used only for its semaphore - if( max_wait > 0 ) { + if( max_wait >= 0 ) { clock_gettime( CLOCK_REALTIME, &ts ); if( max_wait > 999 ) { - seconds = (max_wait - 999)/1000; + seconds = max_wait / 1000; max_wait -= seconds * 1000; ts.tv_sec += seconds; } @@ -1000,11 +1000,11 @@ extern rmr_mbuf_t* rmr_mt_call( void* vctx, rmr_mbuf_t* mbuf, int call_id, int m d1[D1_CALLID_IDX] = (unsigned char) call_id; // set the caller ID for the response mbuf->flags |= MFL_NOALLOC; // send message without allocating a new one (expect nil from mtosend - if( max_wait > 0 ) { + if( max_wait >= 0 ) { clock_gettime( CLOCK_REALTIME, &ts ); if( max_wait > 999 ) { - seconds = (max_wait - 999)/1000; + seconds = max_wait / 1000; max_wait -= seconds * 1000; ts.tv_sec += seconds; }