Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use the none routing as an ancestor to the generic one, which is ancestor to most...
[simgrid.git] / src / surf / surf_routing_generic.c
index 406f771..b985398 100644 (file)
@@ -15,7 +15,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_routing_generic, surf_route, "Generic implementation of the surf routing");
 
 AS_t model_generic_create_sized(size_t childsize) {
-  AS_t new_component = xbt_malloc0(childsize);
+  AS_t new_component = model_none_create_sized(childsize);
 
   new_component->parse_PU = generic_parse_PU;
   new_component->parse_AS = generic_parse_AS;
@@ -27,7 +27,7 @@ AS_t model_generic_create_sized(size_t childsize) {
   new_component->get_onelink_routes = NULL;
   new_component->get_bypass_route =
       generic_get_bypassroute;
-  new_component->finalize = NULL;
+  new_component->finalize = model_none_finalize;
   new_component->to_index = xbt_dict_new();
   new_component->bypassRoutes = xbt_dict_new();