When RMR acks the receipt of a route table to Rt. Mgr. it
was failing to send the table ID. This change fixes this
problem.
Issue-ID: RIC-232
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Change-Id: I363df4d2b1ecc8432ed7767edfabbf78c575838d
API and build change and fix summaries. Doc correctsions
and/or changes are not mentioned here; see the commit messages.
API and build change and fix summaries. Doc correctsions
and/or changes are not mentioned here; see the commit messages.
+2020 February 28; Version 2.3.6
+ Fix bug in Rt. Mgr comm which prevented table ID from being
+ sent on ack message (RIC-232).
+
2020 February 26; version 3.2.5
Fix source address bug in SI95 receive/send funcitons.
Fix threading issues involving session disconnection in SI95
2020 February 26; version 3.2.5
Fix source address bug in SI95 receive/send funcitons.
Fix threading issues involving session disconnection in SI95
set( major_version "3" ) # should be automatically populated from git tag later, but until CI process sets a tag we use this
set( minor_version "2" )
set( major_version "3" ) # should be automatically populated from git tag later, but until CI process sets a tag we use this
set( minor_version "2" )
set( install_root "${CMAKE_INSTALL_PREFIX}" )
set( install_inc "include/rmr" )
set( install_root "${CMAKE_INSTALL_PREFIX}" )
set( install_inc "include/rmr" )
static endpoint_t* rt_ensure_ep( route_table_t* rt, char const* ep_name );
// --------- route manager communications -----------------
static endpoint_t* rt_ensure_ep( route_table_t* rt, char const* ep_name );
// --------- route manager communications -----------------
-static void send_rt_ack( uta_ctx_t* ctx, int state, char* reason );
+static void send_rt_ack( uta_ctx_t* ctx, char* table_id, int state, char* reason );
static int send_update_req( uta_ctx_t* pctx, uta_ctx_t* ctx );
#endif
static int send_update_req( uta_ctx_t* pctx, uta_ctx_t* ctx );
#endif
Context should be the PRIVATE context that we use for messages
to route manger and NOT the user's context.
*/
Context should be the PRIVATE context that we use for messages
to route manger and NOT the user's context.
*/
-static void send_rt_ack( uta_ctx_t* ctx, int state, char* reason ) {
+static void send_rt_ack( uta_ctx_t* ctx, char* table_id, int state, char* reason ) {
rmr_mbuf_t* smsg;
if( ctx == NULL || ctx->rtg_whid < 0 ) {
rmr_mbuf_t* smsg;
if( ctx == NULL || ctx->rtg_whid < 0 ) {
smsg->mtype = RMRRM_TABLE_STATE;
smsg->sub_id = 0;
snprintf( smsg->payload, 1024, "%s %s %s\n", state == RMR_OK ? "OK" : "ERR",
smsg->mtype = RMRRM_TABLE_STATE;
smsg->sub_id = 0;
snprintf( smsg->payload, 1024, "%s %s %s\n", state == RMR_OK ? "OK" : "ERR",
- ctx->table_id == NULL ? "<id-missing>" : ctx->table_id, reason == NULL ? "" : reason );
+ table_id == NULL ? "<id-missing>" : table_id, reason == NULL ? "" : reason );
smsg->len = strlen( smsg->payload ) + 1;
smsg->len = strlen( smsg->payload ) + 1;
rmr_vlog( RMR_VL_ERR, "rmr_rtc: RT update had wrong number of records: received %d expected %s\n",
ctx->new_rtable->updates, tokens[2] );
snprintf( wbuf, sizeof( wbuf ), "missing table records: expected %s got %d\n", tokens[2], ctx->new_rtable->updates );
rmr_vlog( RMR_VL_ERR, "rmr_rtc: RT update had wrong number of records: received %d expected %s\n",
ctx->new_rtable->updates, tokens[2] );
snprintf( wbuf, sizeof( wbuf ), "missing table records: expected %s got %d\n", tokens[2], ctx->new_rtable->updates );
- send_rt_ack( pctx, RMR_OK, wbuf );
+ send_rt_ack( pctx, ctx->table_id, !RMR_OK, wbuf );
uta_rt_drop( ctx->new_rtable );
ctx->new_rtable = NULL;
break;
uta_rt_drop( ctx->new_rtable );
ctx->new_rtable = NULL;
break;
rt_stats( ctx->rtable );
}
rt_stats( ctx->rtable );
}
- send_rt_ack( pctx, RMR_OK, NULL );
+ send_rt_ack( pctx, ctx->table_id, RMR_OK, NULL );
} 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;
}
} else { // start a new table.
if( ctx->new_rtable != NULL ) { // one in progress? this forces it out
} 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;
}
} else { // start a new table.
if( ctx->new_rtable != NULL ) { // one in progress? this forces it out
- send_rt_ack( pctx, !RMR_OK, "table not complete" ); // nack the one that was pending as end never made it
+ send_rt_ack( pctx, ctx->table_id, !RMR_OK, "table not complete" ); // nack the one that was pending as end never made it
if( DEBUG > 1 || (vlevel > 1) ) rmr_vlog_force( RMR_VL_DEBUG, "new table; dropping incomplete table\n" );
uta_rt_drop( ctx->new_rtable );
if( DEBUG > 1 || (vlevel > 1) ) rmr_vlog_force( RMR_VL_DEBUG, "new table; dropping incomplete table\n" );
uta_rt_drop( ctx->new_rtable );
free( ctx->table_id );
}
if( ntoks >2 ) {
free( ctx->table_id );
}
if( ntoks >2 ) {
- ctx->table_id = strdup( tokens[2] );
+ ctx->table_id = strdup( clip( tokens[2] ) );
} else {
ctx->table_id = NULL;
}
} else {
ctx->table_id = NULL;
}
if( ctx->table_id != NULL ) {
free( ctx->table_id );
}
if( ctx->table_id != NULL ) {
free( ctx->table_id );
}
- ctx->table_id = strdup( tokens[2] );
+ ctx->table_id = strdup( clip( tokens[2] ) );
}
ctx->new_rtable = uta_rt_clone_all( ctx->rtable ); // start with a clone of everything (endpts and entries)
}
ctx->new_rtable = uta_rt_clone_all( ctx->rtable ); // start with a clone of everything (endpts and entries)
if [[ -d ../build ]]
then
export LD_LIBRARY_PATH=../build/lib:../build/lib64
if [[ -d ../build ]]
then
export LD_LIBRARY_PATH=../build/lib:../build/lib64
+ export C_INCLUDE_PATH=../build/include
else
if [[ -d ../.build ]]
then
else
if [[ -d ../.build ]]
then