X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Frmr%2Fnanomsg%2Fsrc%2Fsr_static.c;fp=src%2Frmr%2Fnanomsg%2Fsrc%2Fsr_static.c;h=53eb5d9fb6959815f4abea60ee818d169cb2dd96;hb=68d09fa5028e47e763c44c30647da31e77eda64a;hp=18acdda51b9d96379d539b77c261b9deba050983;hpb=b5f659837dd6c01bffde1f2f449328b42b47ccf5;p=ric-plt%2Flib%2Frmr.git diff --git a/src/rmr/nanomsg/src/sr_static.c b/src/rmr/nanomsg/src/sr_static.c index 18acdda..53eb5d9 100644 --- a/src/rmr/nanomsg/src/sr_static.c +++ b/src/rmr/nanomsg/src/sr_static.c @@ -116,7 +116,8 @@ static rmr_mbuf_t* alloc_zcmsg( uta_ctx_t* ctx, rmr_mbuf_t* msg, int size, int s 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) msg->flags |= MFL_ZEROCOPY; // this is a zerocopy sendable message - strncpy( (char *) ((uta_mhdr_t *)msg->header)->src, ctx->my_name, RMR_MAX_SID ); + strncpy( (char *) ((uta_mhdr_t *)msg->header)->src, ctx->my_name, RMR_MAX_SRC ); + strncpy( (char *) ((uta_mhdr_t *)msg->header)->srcip, ctx->my_ip, RMR_MAX_SRC ); if( DEBUG > 1 ) fprintf( stderr, "[DBUG] alloc_zcmsg mlen = %d size=%d mpl=%d flags=%02x %p m=%p @%p\n", mlen, size, ctx->max_plen, msg->flags, &msg->flags, msg, msg->header ); @@ -334,7 +335,8 @@ static rmr_mbuf_t* send_msg( uta_ctx_t* ctx, rmr_mbuf_t* msg, int nn_sock ) { hdr->plen = htonl( msg->len ); if( msg->flags & MFL_ADDSRC ) { // buffer was allocated as a receive buffer; must add our source - strncpy( (char *) ((uta_mhdr_t *)msg->header)->src, ctx->my_name, RMR_MAX_SID ); // must overlay the source to be ours + strncpy( (char *) ((uta_mhdr_t *)msg->header)->src, ctx->my_name, RMR_MAX_SRC ); // must overlay the source to be ours + strncpy( (char *) ((uta_mhdr_t *)msg->header)->srcip, ctx->my_ip, RMR_MAX_SRC ); } tr_len = RMR_TR_LEN( hdr );