Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
also cleanup the field names of s_sg_platf_router_cbarg_t
[simgrid.git] / src / surf / surf_routing.c
index d81bfe5..24f8467 100644 (file)
@@ -132,24 +132,23 @@ static void parse_S_router(sg_platf_router_cbarg_t router)
   network_element_info_t info = NULL;
   if (current_routing->hierarchy == SURF_ROUTING_NULL)
     current_routing->hierarchy = SURF_ROUTING_BASE;
-  xbt_assert(!xbt_lib_get_or_null(as_router_lib,router->V_router_id, ROUTING_ASR_LEVEL),
+  xbt_assert(!xbt_lib_get_or_null(as_router_lib,router->id, ROUTING_ASR_LEVEL),
               "Reading a router, processing unit \"%s\" already exists",
-              router->V_router_id);
+              router->id);
   xbt_assert(current_routing->set_processing_unit,
               "no defined method \"set_processing_unit\" in \"%s\"",
               current_routing->name);
-  (*(current_routing->set_processing_unit)) (current_routing,
-                 router->V_router_id);
+  (*(current_routing->set_processing_unit)) (current_routing, router->id);
   info = xbt_new0(s_network_element_info_t, 1);
   info->rc_component = current_routing;
   info->rc_type = SURF_NETWORK_ELEMENT_ROUTER;
 
-  xbt_lib_set(as_router_lib,router->V_router_id,ROUTING_ASR_LEVEL,(void *) info);
+  xbt_lib_set(as_router_lib,router->id,ROUTING_ASR_LEVEL,(void *) info);
   if (strcmp(A_surfxml_router_coordinates,"")) {
        if(!COORD_ASR_LEVEL) xbt_die("To use coordinates, you must set configuration 'coordinates' to 'yes'");
     xbt_dynar_t ctn = xbt_str_split_str(A_surfxml_router_coordinates, " ");
     xbt_dynar_shrink(ctn, 0);
-    xbt_lib_set(as_router_lib,router->V_router_id,COORD_ASR_LEVEL,(void *) ctn);
+    xbt_lib_set(as_router_lib,router->id,COORD_ASR_LEVEL,(void *) ctn);
   }
 }
 
@@ -159,8 +158,8 @@ static void parse_S_router(sg_platf_router_cbarg_t router)
 static void parse_S_router_lua(const char* router_id) {
   s_sg_platf_router_cbarg_t router;
   memset(&router,0,sizeof(router));
-       router.V_router_id = router_id;
-       router.V_router_coord = "";
+       router.id = router_id;
+       router.coord = "";
        return parse_S_router(&router);
 }