X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Frmr%2Fnng%2Fsrc%2Fmt_call_nng_static.c;h=d3a914a3a82a6221617620e6f96975b401604977;hb=8633a0b93e26b619a367de0614437ef2eb4a0b37;hp=71106f1095dc8420c7d081b576e5531d5f4161fc;hpb=dfe7b622b128e7bfb4a5e1f7e0afdb84e6001d14;p=ric-plt%2Flib%2Frmr.git diff --git a/src/rmr/nng/src/mt_call_nng_static.c b/src/rmr/nng/src/mt_call_nng_static.c index 71106f1..d3a914a 100644 --- a/src/rmr/nng/src/mt_call_nng_static.c +++ b/src/rmr/nng/src/mt_call_nng_static.c @@ -38,7 +38,7 @@ static inline void queue_normal( uta_ctx_t* ctx, rmr_mbuf_t* mbuf ) { if( ! uta_ring_insert( ctx->mring, mbuf ) ) { rmr_free_msg( mbuf ); // drop if ring is full if( !warned ) { - fprintf( stderr, "[WARN] rmr_mt_receive: application is not receiving fast enough; messages dropping\n" ); + rmr_vlog( RMR_VL_WARN, "rmr_mt_receive: application is not receiving fast enough; messages dropping\n" ); warned++; } @@ -64,7 +64,8 @@ static inline void queue_normal( uta_ctx_t* ctx, rmr_mbuf_t* mbuf ) { The transaction ID in the message matches the expected ID in the chute, then the message is given to the chute and the chute's semaphore is tickled. - If none are true, the message is dropped. + If none are true, the message is queued on the normal receive queue and that + related semaphore is tickeled. */ static void* mt_receive( void* vctx ) { uta_ctx_t* ctx; @@ -79,12 +80,12 @@ static void* mt_receive( void* vctx ) { return NULL; } - fprintf( stderr, "[INFO] rmr mt_receiver is spinning\n" ); + rmr_vlog( RMR_VL_INFO, "rmr mt_receiver is spinning\n" ); while( ! ctx->shutdown ) { mbuf = rcv_msg( ctx, NULL ); - if( mbuf != NULL && (hdr = (uta_mhdr_t *) mbuf->header) != NULL ) { + if( mbuf != NULL && (hdr = (uta_mhdr_t *) mbuf->header) != NULL && mbuf->payload != NULL ) { if( hdr->flags & HFL_CALL_MSG ) { // call generated message; ignore call-id etc and queue queue_normal( ctx, mbuf ); } else {