# API and build change and fix summaries. Doc corrections
# and/or changes are not mentioned here; see the commit messages.
+2022 January 17; version 4.8.2
+ Fixes routing statistics printout crash (RIC-872).
+
2022 January 7; version 4.8.1
Re-enables RMR libary's module tests (RIC-861).
Creates a new unit test for the debugging rmr rx queue API.
set( major_version "4" ) # should be automatically populated from git tag later, but until CI process sets a tag we use this
set( minor_version "8" )
-set( patch_level "1" )
+set( patch_level "2" )
set( install_root "${CMAKE_INSTALL_PREFIX}" )
set( install_inc "include/rmr" )
version 4.0.0, the RMR versions should no longer skip.
+2022 January 17; version 4.8.2
+------------------------------
+
+Fixes routing statistics printout crash (RIC-872).
+
+
+
2022 January 7; version 4.8.1
------------------------------
*/
static route_table_t* prep_new_rt( uta_ctx_t* ctx, int all ) {
int counter = 0;
+ int ref_count;
route_table_t* rt;
if( ctx == NULL ) {
if( (rt = ctx->old_rtable) != NULL ) {
ctx->old_rtable = NULL;
- while( rt->ref_count > 0 ) { // wait for all who are using to stop
+
+ pthread_mutex_lock( ctx->rtgate );
+ ref_count = rt->ref_count;
+ pthread_mutex_unlock( ctx->rtgate );
+
+ while( ref_count > 0 ) { // wait for all who are using to stop
if( counter++ > 1000 ) {
rmr_vlog( RMR_VL_WARN, "rt_prep_newrt: internal mishap, ref count on table seems wedged" );
break;
}
usleep( 1000 ); // small sleep to yield the processer if that is needed
+
+ pthread_mutex_lock( ctx->rtgate );
+ ref_count = rt->ref_count;
+ pthread_mutex_unlock( ctx->rtgate );
}
if( rt->hash != NULL ) {
uta_ctx_t* ctx; // context user has -- where we pin the route table
uta_ctx_t* pvt_cx; // private context for session with rtg
rmr_mbuf_t* msg = NULL; // message from rtg
+ route_table_t* rt; // the routing table that will be traversed to print statistics
char* my_port; // the port number that we will listen on (4561 has been the default for this)
char* rtg_addr; // host:port address of route table generator (route manager)
char* daddr; // duplicated rtg address string to parse/trash
count_delay = 300;
}
if( vlevel >= 0 ) { // allow it to be forced off with -n in verbose file
- rt_epcounts( ctx->rtable, ctx->my_name );
+ rt = get_rt( ctx ); // get active route table and up ref count
+ rt_epcounts( rt, ctx->my_name );
+ release_rt( ctx, rt ); // dec safely the ref counter
}
}
uta_ctx_t* ctx; // context user has -- where we pin the route table
uta_ctx_t* pvt_cx; // private context for session with rtg
rmr_mbuf_t* msg = NULL; // message from rtg
+ route_table_t* rt; // the routing table that will be traversed to print statistics
char* payload; // payload in the message
size_t mlen;
char* port; // a port number we listen/connect to
if( blabber > bump_freq ) {
count_delay = 300;
}
- rt_epcounts( ctx->rtable, ctx->my_name );
+ rt = get_rt( ctx ); // get active route table and up ref count
+ rt_epcounts( rt, ctx->my_name );
+ release_rt( ctx, rt ); // dec safely the ref counter
}
}