if(s->connMan->get_connections_to_group(intermediate_group_id).size()==0){//if we don't have a connection to the intermediate group, we have to reroute or reselect
if(s->connMan->get_connections_to_group(intermediate_group_id).size()==0){//if we don't have a connection to the intermediate group, we have to reroute or reselect
}//else we already have a connection to the intermediate group
}
else{
tw_error(TW_LOC,"Invalid router type in typemap\n");
}
}
}//else then we will reroute if necessary
}//else we're not in the source group so we don't care about picking good intermediate routers
if(s->params->source_group_rerouting==0&&isRoutingAdaptive(routing)){//if we cannot reroute within our source group, we have to pick a new intermediate router
dfp_reselect_intermediate_router(s,bf,msg,lp,origin_group_id,fdest_group_id);//alters msg->intm_rtr_id to be more appropriate
}
}
ConnectionnextStopConn;//the connection that we will forward the packet to