strcmp (child1_name, child2_name) != 0){
xbt_dynar_t route = NULL;
- route = global_routing->get_route_or_null (child1_name, child2_name);
+ xbt_ex_t e;
+
+ TRY {
+ route = routing_get_route(child1_name, child2_name);
+ } CATCH(e) {
+ xbt_ex_free(e);
+ }
if (route == NULL) continue;
if (TRACE_onelink_only()){
AS_t root;
void *loopback;
size_t size_of_link;
- xbt_dynar_t(*get_route_or_null) (const char *src, const char *dst);
xbt_dynar_t(*get_route_no_cleanup) (const char *src, const char *dst);
xbt_dynar_t(*get_onelink_routes) (void);
double (*get_latency) (const char *src, const char *dst);
return route;
}
-/**
- * \brief Generic method: find a route between hosts
- *
- * \param src the source host name
- * \param dst the destination host name
- *
- * same as get_route, but return NULL if any exception is raised.
- */
-static xbt_dynar_t get_route_or_null(const char *src, const char *dst)
-{
- xbt_dynar_t route = NULL;
- xbt_ex_t exception;
- TRY {
- get_route_latency(src, dst, &route, NULL, 1);
- } CATCH(exception) {
- xbt_ex_free(exception);
- return NULL;
- }
- return route;
-}
-
/**
* \brief Generic method: find a route between hosts
*
/* config the uniq global routing */
global_routing = xbt_new0(s_routing_global_t, 1);
global_routing->root = NULL;
- global_routing->get_route_or_null = get_route_or_null;
global_routing->get_latency = get_latency;
global_routing->get_route_no_cleanup = get_route_no_cleanup;
global_routing->get_onelink_routes = get_onelink_routes;