Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] bug fix on the way that routes are used to extract topology
authorLucas Schnorr <Lucas.Schnorr@imag.fr>
Wed, 7 Sep 2011 13:51:26 +0000 (15:51 +0200)
committerLucas Schnorr <Lucas.Schnorr@imag.fr>
Thu, 8 Sep 2011 14:56:11 +0000 (16:56 +0200)
src/instr/instr_routing.c

index f77a341..9ac0932 100644 (file)
@@ -116,11 +116,11 @@ static void recursiveGraphExtraction (routing_component_t rc, container_t contai
         if (TRACE_onelink_only()){
           if (xbt_dynar_length (route) > 1) continue;
         }
-        unsigned int cpt;
-        void *link;
         container_t previous = child1;
-        xbt_dynar_foreach (route, cpt, link) {
-          char *link_name = ((link_CM02_t)link)->lmm_resource.generic_resource.name;
+        int i;
+        for (i = 0; i < xbt_dynar_length(route); i++){
+          link_CM02_t *link = ((link_CM02_t*)xbt_dynar_get_ptr (route, i));
+          char *link_name = (*link)->lmm_resource.generic_resource.name;
           container_t current = getContainerByName(link_name);
           linkContainers(container, previous, current, filter);
           previous = current;