Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
implement some more getters in surf::Link and s4u::Link
[simgrid.git] / src / surf / network_interface.cpp
index 0b5a2bb..6521cfd 100644 (file)
@@ -30,6 +30,13 @@ namespace simgrid {
   {
     return links->size();
   }
+  void LinkImpl::linksList(std::vector<s4u::Link*>* linkList)
+  {
+    for (auto const& kv : *links) {
+      linkList->push_back(&kv.second->piface_);
+    }
+  }
+
   /** @brief Returns a list of all existing links */
   LinkImpl** LinkImpl::linksList()
   {
@@ -196,7 +203,7 @@ namespace simgrid {
     {
       std::list<LinkImpl*> retlist;
       lmm_system_t sys = getModel()->getMaxminSystem();
-      int llen         = lmm_get_number_of_cnst_from_var(sys, variable_);
+      int llen         = lmm_get_number_of_cnst_from_var(sys, getVariable());
 
       for (int i = 0; i < llen; i++) {
         /* Beware of composite actions: ptasks put links and cpus together */