X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fnng%2Fsrc%2Fsr_nng_static.c;h=7c175894dc2ebd5485313b8466a372730767e7a8;hb=a41c6f5f26b3a44009f4aff3df3f83b9a79ace01;hp=e1a2fa53b1ddabf27400c3e089f7789d868687dd;hpb=8790bf0c4f4f08fd05853afa67e211112b344a42;p=ric-plt%2Flib%2Frmr.git diff --git a/src/nng/src/sr_nng_static.c b/src/nng/src/sr_nng_static.c index e1a2fa5..7c17589 100644 --- a/src/nng/src/sr_nng_static.c +++ b/src/nng/src/sr_nng_static.c @@ -147,6 +147,8 @@ static rmr_mbuf_t* alloc_zcmsg( uta_ctx_t* ctx, rmr_mbuf_t* msg, int size, int s } msg->len = 0; // length of data in the payload msg->alloc_len = mlen; // length of allocated transport buffer + msg->sub_id = UNSET_SUBID; + msg->mtype = UNSET_MSGTYPE; msg->payload = PAYLOAD_ADDR( hdr ); // point to payload (past all header junk) msg->xaction = ((uta_mhdr_t *)msg->header)->xid; // point at transaction id in header area msg->state = state; // fill in caller's state (likely the state of the last operation) @@ -175,6 +177,8 @@ static rmr_mbuf_t* alloc_mbuf( uta_ctx_t* ctx, int state ) { memset( msg, 0, sizeof( *msg ) ); + msg->sub_id = UNSET_SUBID; + msg->mtype = UNSET_MSGTYPE; msg->tp_buf = NULL; msg->header = NULL; msg->len = -1; // no payload; invalid len