X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Frmr%2Fcommon%2Fsrc%2Fwormholes.c;h=1167c250ed8fecc2d71ba27aeabb783ceeb1906e;hb=0d4def6c7b673f3be486338ced65ccdd25a859ed;hp=2bc5c9f713e5bfbdd1589c34b6300d16dc7c50af;hpb=a1575dacc478b945ea63f5d0cc3db3d66dcb5983;p=ric-plt%2Flib%2Frmr.git diff --git a/src/rmr/common/src/wormholes.c b/src/rmr/common/src/wormholes.c index 2bc5c9f..1167c25 100644 --- a/src/rmr/common/src/wormholes.c +++ b/src/rmr/common/src/wormholes.c @@ -105,7 +105,7 @@ static int wh_init( uta_ctx_t* ctx ) { } if( (whm = malloc( sizeof( *whm ) )) == NULL ) { - fprintf( stderr, "mem alloc failed for whm: alloc %d bytes\n", (int) sizeof( *whm ) ); + rmr_vlog( RMR_VL_ERR, "mem alloc failed for whm: alloc %d bytes\n", (int) sizeof( *whm ) ); errno = ENOMEM; return 0; } @@ -113,7 +113,7 @@ static int wh_init( uta_ctx_t* ctx ) { whm->nalloc = 16; alloc_sz = whm->nalloc * sizeof( endpoint_t ); if( (whm->eps = (endpoint_t **) malloc( alloc_sz )) == NULL ) { - fprintf( stderr, "mem alloc failed: alloc %d bytes\n", (int) alloc_sz ); + rmr_vlog( RMR_VL_ERR, "mem alloc failed: alloc %d bytes\n", (int) alloc_sz ); free( whm ); errno = ENOMEM; return 0; @@ -209,7 +209,7 @@ extern rmr_whid_t rmr_wh_open( void* vctx, char const* target ) { if( (ep = rt_ensure_ep( ctx->rtable, target )) == NULL ) { // get pointer to ep if there, create new if not - fprintf( stderr, "ensure ep returned bad; setting no memory error\n" ); + rmr_vlog( RMR_VL_ERR, "wormhole_open: ensure ep returned bad: target=%s\n", target ); return -1; // ensure sets errno } @@ -275,7 +275,7 @@ extern rmr_mbuf_t* rmr_wh_send_msg( void* vctx, rmr_whid_t whid, rmr_mbuf_t* msg errno = 0; // nng seems not to set errno any longer, so ensure it's clear if( msg->header == NULL ) { - fprintf( stderr, "[ERR] rmr_wh_send_msg: message had no header\n" ); + rmr_vlog( RMR_VL_ERR, "rmr_wh_send_msg: message had no header\n" ); msg->state = RMR_ERR_NOHDR; errno = EBADMSG; // must ensure it's not eagain return msg;