xbt_dict_free(&(as->generic_routing.to_index));
/* Delete dictionary index dict, predecessor and links table */
xbt_free(as->predecessor_table);
- /* Delete structure */
- xbt_free(rc);
+
+ model_generic_finalize(rc);
}
}
}
}
-static int surf_pointer_resource_cmp(const void *a, const void *b) {
+static int floyd_pointer_resource_cmp(const void *a, const void *b) {
return a != b;
}
xbt_assert(!xbt_dynar_compare(
(void*)TO_FLOYD_LINK(*src_id, *dst_id)->link_list,
(void*)link_route_to_test,
- (int_f_cpvoid_cpvoid_t) surf_pointer_resource_cmp),
+ (int_f_cpvoid_cpvoid_t) floyd_pointer_resource_cmp),
"The route between \"%s\" and \"%s\" already exists", src,dst);
}
else
xbt_assert(!xbt_dynar_compare(
(void*)TO_FLOYD_LINK(*dst_id, *src_id)->link_list,
(void*)link_route_to_test,
- (int_f_cpvoid_cpvoid_t) surf_pointer_resource_cmp),
+ (int_f_cpvoid_cpvoid_t) floyd_pointer_resource_cmp),
"The route between \"%s\" and \"%s\" already exists", src,dst);
}
else
{
if(route->dst_gateway && route->src_gateway)
{
- char *gw_src = xbt_strdup(route->src_gateway);
- char *gw_dst = xbt_strdup(route->dst_gateway);
+ char *gw_src = route->src_gateway;
+ char *gw_dst = route->dst_gateway;
route->src_gateway = gw_dst;
route->dst_gateway = gw_src;
}