Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
code simplification: write the recursivity properly
[simgrid.git] / src / kernel / routing / AsImpl.cpp
index 9fe0cef..a0841b9 100644 (file)
@@ -43,6 +43,13 @@ namespace simgrid {
 
   void AsImpl::getOneLinkRoutes(std::vector<Onelink*>* accumulator)
   {
 
   void AsImpl::getOneLinkRoutes(std::vector<Onelink*>* accumulator)
   {
+    // recursing only. I have no route myself :)
+    char* key;
+    xbt_dict_cursor_t cursor = nullptr;
+    AsImpl* rc_child;
+    xbt_dict_foreach (children(), cursor, key, rc_child) {
+      rc_child->getOneLinkRoutes(accumulator);
+    }
   }
 
   /** @brief Get the common ancestor and its first children in each line leading to src and dst
   }
 
   /** @brief Get the common ancestor and its first children in each line leading to src and dst