}
memset( rrg, 0, sizeof( *rrg ) );
- if( (rrg->epts = (endpoint_t **) malloc( sizeof( endpoint_t ) * MAX_EP_GROUP )) == NULL ) {
+ if( (rrg->epts = (endpoint_t **) malloc( sizeof( endpoint_t* ) * MAX_EP_GROUP )) == NULL ) {
rmr_vlog( RMR_VL_WARN, "rmr_add_ep: malloc failed for group endpoint array: group=%d\n", group );
free( rrg );
return NULL;
}
- memset( rrg->epts, 0, sizeof( endpoint_t ) * MAX_EP_GROUP );
+ memset( rrg->epts, 0, sizeof( endpoint_t* ) * MAX_EP_GROUP );
rte->rrgroups[group] = rrg;
if( PARANOID_CHECKS ) {
if( ctx == NULL ) {
- if( DEBUG ) rmr_vlog( RMR_VL_DEBUG, "epsock_byname: parinoia check pop ctx=%p\n", ctx, rt );
+ if( DEBUG ) rmr_vlog( RMR_VL_DEBUG, "epsock_byname: paranoia check pop ctx=%p rt=%p\n", ctx, rt );
return FALSE;
}
- rt = get_rt( ctx ); // get active rt and bump ref count
- if( rt == NULL || (si_ctx = ctx->si_ctx) == NULL ) {
- if( DEBUG ) rmr_vlog( RMR_VL_DEBUG, "epsock_byname: parinoia check pop rt=%p sictx=%p\n", rt, si_ctx );
+ if( (si_ctx = ctx->si_ctx) == NULL ) {
+ if( DEBUG ) rmr_vlog( RMR_VL_DEBUG, "epsock_byname: paranoia check pop sictx is nil\n" );
+ return FALSE;
+ }
+ if( (rt = get_rt( ctx )) == NULL ) { // get active rt and bump ref count
+ if( DEBUG ) rmr_vlog( RMR_VL_DEBUG, "epsock_byname: paranoia check pop no rtable\n" );
return FALSE;
}
} else {