A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'parser'
[simgrid.git]
/
src
/
surf
/
surf_routing_dijkstra.c
diff --git
a/src/surf/surf_routing_dijkstra.c
b/src/surf/surf_routing_dijkstra.c
index
68ea411
..
4e51e93
100644
(file)
--- a/
src/surf/surf_routing_dijkstra.c
+++ b/
src/surf/surf_routing_dijkstra.c
@@
-417,19
+417,13
@@
static void dijkstra_finalize(AS_t asg)
{
as_dijkstra_t as = (as_dijkstra_t) asg;
- if (as) {
- xbt_graph_free_graph(as->route_graph, &xbt_free,
- &graph_edge_data_free, &xbt_free);
- xbt_dict_free(&as->graph_node_map);
- if (as->cached)
- xbt_dict_free(&as->route_cache);
- /* Delete bypass dict */
- xbt_dict_free(&as->generic_routing.bypassRoutes);
- /* Delete index dict */
- xbt_dict_free(&(as->generic_routing.to_index));
- /* Delete structure */
- xbt_free(as);
- }
+ xbt_graph_free_graph(as->route_graph, &xbt_free,
+ &graph_edge_data_free, &xbt_free);
+ xbt_dict_free(&as->graph_node_map);
+ if (as->cached)
+ xbt_dict_free(&as->route_cache);
+
+ model_generic_finalize(asg);
}
/* Creation routing model functions */
@@
-437,7
+431,7
@@
static void dijkstra_finalize(AS_t asg)
AS_t model_dijkstra_both_create(int cached)
{
as_dijkstra_t new_component = (as_dijkstra_t)
-
routmod_generic_create
(sizeof(s_as_dijkstra_t));
+
model_generic_create_sized
(sizeof(s_as_dijkstra_t));
new_component->generic_routing.parse_route = model_dijkstra_both_parse_route;
new_component->generic_routing.parse_ASroute = model_dijkstra_both_parse_route;
@@
-519,9
+513,9
@@
void model_dijkstra_both_parse_route (AS_t asg, const char *src,
else{
XBT_DEBUG("Load ASroute from \"%s(%s)\" to \"%s(%s)\"", src,
route->src_gateway, dst, route->dst_gateway);
- if(
global_routing->
get_network_element_type((const char*)route->dst_gateway) == SURF_NETWORK_ELEMENT_NULL)
+ if(
routing_
get_network_element_type((const char*)route->dst_gateway) == SURF_NETWORK_ELEMENT_NULL)
xbt_die("The dst_gateway '%s' does not exist!",route->dst_gateway);
- if(
global_routing->
get_network_element_type((const char*)route->src_gateway) == SURF_NETWORK_ELEMENT_NULL)
+ if(
routing_
get_network_element_type((const char*)route->src_gateway) == SURF_NETWORK_ELEMENT_NULL)
xbt_die("The src_gateway '%s' does not exist!",route->src_gateway);
}