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 );
endpoint cannot be found false (0) is returned.
*/
static int uta_epsock_byname( uta_ctx_t* ctx, char* ep_name, int* nn_sock, endpoint_t** uepp ) {
- route_table_t* rt;
+ route_table_t* rt = NULL;
si_ctx_t* si_ctx;
endpoint_t* ep;
int state = FALSE;
- if( PARINOID_CHECKS ) {
+ if( PARANOID_CHECKS ) {
if( ctx == NULL || (rt = ctx->rtable) == NULL || (si_ctx = ctx->si_ctx) == NULL ) {
+ if( DEBUG ) rmr_vlog( RMR_VL_DEBUG, "epsock_byname: parinoia check pop ctx=%p rt=%p\n", ctx, rt );
return FALSE;
}
} else {
}
ep = rmr_sym_get( rt->hash, ep_name, 1 );
+ if( DEBUG ) rmr_vlog( RMR_VL_DEBUG, "epsock_byname: ep not found: %s\n", ep_name );
if( uepp != NULL ) { // caller needs endpoint too, give it back
*uepp = ep;
}
rrgroup_t* rrg;
int idx;
- if( PARINOID_CHECKS ) {
+ if( PARANOID_CHECKS ) {
if( ctx == NULL || (si_ctx = ctx->si_ctx) == NULL ) {
return FALSE;
}
char* meid;
si_ctx_t* si_ctx;
- if( PARINOID_CHECKS ) {
+ if( PARANOID_CHECKS ) {
if( ctx == NULL || (si_ctx = ctx->si_ctx) == NULL ) {
return FALSE;
}