# API and build change and fix summaries. Doc correctsions
# and/or changes are not mentioned here; see the commit messages.
+2020 July 9; version 4.1.3
+ Allow RTS messages to be sent before the arrival of the initial
+ route table. Calls to RTS (heart beat responses) prior to the
+ initial route table load could cause a crash if a framework
+ blindly assumes that RTS is valid. (RIC-589)
+
2020 June 22; version 4.1.2
Fix typo in RIC Message header file.
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 "1" )
-set( patch_level "2" )
+set( patch_level "3" )
set( install_root "${CMAKE_INSTALL_PREFIX}" )
set( install_inc "include/rmr" )
included with the RMR development package while subscription
IDs are generated by the subscription manager process at
run-time. This document does not include the constant values
-to avoid incorrectly propigating a stale value through the
+to avoid incorrectly propagating a stale value through the
reference of an outdated document.
version 4.0.0, the RMR versions should no longer skip.
+2020 July 9; version 4.1.3
+--------------------------
+
+Allow RTS messages to be sent before the arrival of the
+initial route table. Calls to RTS (heart beat responses)
+prior to the initial route table load could cause a crash if
+a framework blindly assumes that RTS is valid. (RIC-589)
+
+
+
2020 June 22; version 4.1.2
---------------------------
}
send_rt_ack( pctx, mbuf, ctx->table_id, RMR_OK, NULL );
+ ctx->rtable_ready = 1; // route based sends can now happen
} else {
if( DEBUG > 1 ) rmr_vlog_force( RMR_VL_DEBUG, "end of route table noticed, but one was not started!\n" );
ctx->new_rtable = NULL;
int d1_len; // extra header data 1 length
int d2_len; // extra header data 2 length (future)
nng_socket nn_sock; // our general listen socket
+ int rmr_ready; // rmr table has been loaded/recived
route_table_t* rtable; // the active route table
route_table_t* old_rtable; // the previously used rt, sits here to allow for draining
route_table_t* new_rtable; // route table under construction
return NULL;
}
+ ctx->rtable = rt_clone_space( NULL, NULL, 0 ); // allows wormhole and rts calls to work before rt is received
if( flags & FL_NOTHREAD ) { // if no rtc thread, we still need an empty route table for wormholes
- ctx->rtable = rt_clone_space( NULL, NULL, 0 ); // so create one
+ ctx->rmr_ready = 1; // for a nothread instance, rmr is ready to go here
} else {
+ ctx->rmr_ready = o; // ensure not ready until static/dynamic table loaded
+
if( (tok = getenv( ENV_RTG_RAW )) != NULL && *tok == '0' ) { // use RMR for Rmgr comm only when specifically off
if( pthread_create( &ctx->rtc_th, NULL, rtc, (void *) ctx ) ) { // kick the rmr based rt collector thread
rmr_vlog( RMR_VL_WARN, "rmr_init: unable to start route table collector thread: %s", strerror( errno ) );
return FALSE;
}
- if( ctx->rtable != NULL ) {
- return TRUE;
- }
-
- return FALSE;
+ return ctx->rmr_ready;
}
/*
int d1_len; // extra header data 1 length
int d2_len; // extra header data 2 length (future)
int nn_sock; // our general listen socket
+ int rtable_ready; // set to true when rt is received or loaded
route_table_t* rtable; // the active route table
route_table_t* old_rtable; // the previously used rt, sits here to allow for draining
route_table_t* new_rtable; // route table under construction
// finish all flag setting before threads to keep helgrind quiet
ctx->flags |= CFL_MTC_ENABLED; // for SI threaded receiver is the only way
- if( flags & RMRFL_NOTHREAD ) { // thread set to off; no route table collector started (could be called by the rtc thread itself)
- ctx->rtable = rt_clone_space( NULL, NULL, 0 ); // creates an empty route table so that wormholes still can be used
+ ctx->rtable = rt_clone_space( NULL, NULL, 0 ); // create an empty route table so that wormhole/rts calls can be used
+ if( flags & RMRFL_NOTHREAD ) { // no thread prevents the collector start for very special cases
+ ctx->rtable_ready = 1; // route based sends will always fail, but rmr is ready for the non thread case
} else {
+ ctx->rtable_ready = 0; // no sends until a real route table is loaded in the rtc thread
+
if( static_rtc ) {
rmr_vlog( RMR_VL_INFO, "rmr_init: file based route table only for context on port %s\n", uproto_port );
if( pthread_create( &ctx->rtc_th, NULL, rtc_file, (void *) ctx ) ) { // kick the rt collector thread as just file reader
return FALSE;
}
- if( ctx->rtable != NULL ) {
- return TRUE;
- }
-
- return FALSE;
+ return ctx->rtable_ready;
}
/*