From 3d2aa6e9e465c245ca42cb93f88906c401fa9f1f Mon Sep 17 00:00:00 2001 From: Gabriel Corona Date: Tue, 1 Dec 2015 13:24:49 +0100 Subject: [PATCH] [surf] Remove one router callback --- src/surf/sg_platf.cpp | 8 +------- src/surf/surf_routing.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index 372fb59496..6772e4fc5a 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -152,13 +152,7 @@ void sg_platf_new_host_link(sg_platf_host_link_cbarg_t h){ fun(h); } } -void sg_platf_new_router(sg_platf_router_cbarg_t router) { - unsigned int iterator; - sg_platf_router_cb_t fun; - xbt_dynar_foreach(sg_platf_router_cb_list, iterator, fun) { - fun(router); - } -} + void sg_platf_new_link(sg_platf_link_cbarg_t link){ unsigned int iterator; sg_platf_link_cb_t fun; diff --git a/src/surf/surf_routing.cpp b/src/surf/surf_routing.cpp index 5d4588ccc7..71a875abff 100644 --- a/src/surf/surf_routing.cpp +++ b/src/surf/surf_routing.cpp @@ -197,7 +197,7 @@ RoutingEdge *routing_add_host(As* current_routing, sg_platf_host_cbarg_t host) /** * \brief Add a "router" to the network element list */ -static void parse_S_router(sg_platf_router_cbarg_t router) +void sg_platf_new_router(sg_platf_router_cbarg_t router) { if (current_routing->p_hierarchy == SURF_ROUTING_NULL) current_routing->p_hierarchy = SURF_ROUTING_BASE; @@ -232,6 +232,12 @@ static void parse_S_router(sg_platf_router_cbarg_t router) xbt_lib_set(as_router_lib, router->id, COORD_ASR_LEVEL, (void *) ctn); XBT_DEBUG("Having set router coordinates for '%s'",router->id); } + + unsigned int iterator; + sg_platf_router_cb_t fun; + xbt_dynar_foreach(sg_platf_router_cb_list, iterator, fun) { + fun(router); + } } /** -- 2.20.1