Fix bug introduced with code smell fix 90/4590/1 2.3.1
authorE. Scott Daniels <daniels@research.att.com>
Fri, 21 Aug 2020 11:30:28 +0000 (07:30 -0400)
committerE. Scott Daniels <daniels@research.att.com>
Fri, 21 Aug 2020 11:30:28 +0000 (07:30 -0400)
The change to the message constructor to fix a "code smell" identified
by sonar introduced the use of an uninitialised variable.  This change
fixes this.

Issue-ID: RIC-629

Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Change-Id: I2ecf7a558b1b42bc0d225db7b60dbc61016f6f2b

CHANGES
CMakeLists.txt
src/messaging/message.cpp

diff --git a/CHANGES b/CHANGES
index bde4d75..9b3e70e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,9 @@
 # squished to one.
 
 release = Cherry
+2020 21 August; version 2.3.1
+       Fix bug in message introduced with "code smell" fix. (RIC-629)
+
 2020 20 August; version 2.3.0
        Address sonar flagged "bugs" in the config class (RIC-629).
 
index 88d09a9..a513b56 100644 (file)
@@ -30,7 +30,7 @@ cmake_minimum_required( VERSION 3.5 )
 
 set( major_version "2" )               # should be automatically populated from git tag later, but until CI process sets a tag we use this
 set( minor_version "3" )
-set( patch_level "0" )
+set( patch_level "1" )
 
 set( install_root "${CMAKE_INSTALL_PREFIX}" )
 set( install_inc "include/ricxfcpp" )
index 30c7548..bd11602 100644 (file)
@@ -57,12 +57,11 @@ xapp::Message::Message( rmr_mbuf_t* mbuf, void* mrc ) :
        mbuf(  mbuf )
 {  /* empty body */ }
 
-xapp::Message::Message( void* mrctx, int payload_len ) :
-       mrc(  mrctx ),                                                                          // the message router context for sends
-       mbuf(  rmr_alloc_msg( mrc, payload_len ) )
+xapp::Message::Message( void* rmr_ctx, int payload_len ) :
+       mrc(  rmr_ctx ),                                                                                // the message router context for sends
+       mbuf(  rmr_alloc_msg( rmr_ctx, payload_len ) )
 { /* empty body */ }
-//     this->mrc = mrc;
-       //this->mbuf = rmr_alloc_msg( mrc, payload_len );
+
 
 /*
        Copy builder.  Given a source object instance (soi), create a copy.