Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / src / simgrid / host.cpp
index 70e54c4..9808aa6 100644 (file)
@@ -11,7 +11,7 @@
 #include <xbt/Extendable.hpp>
 #include <simgrid/s4u/host.hpp>
 
-#include "src/kernel/routing/NetCard.hpp"
+#include "src/kernel/routing/NetPoint.hpp"
 #include "src/surf/HostImpl.hpp"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sg_host, sd, "Logging specific to sg_hosts");
@@ -81,8 +81,8 @@ sg_host_t sg_host_by_name(const char *name)
 
 static int hostcmp_voidp(const void* pa, const void* pb)
 {
-  return strcmp((*static_cast<simgrid::s4u::Host* const*>(pa))->name().c_str(),
-                (*static_cast<simgrid::s4u::Host* const*>(pb))->name().c_str());
+  return strcmp((*static_cast<simgrid::s4u::Host* const*>(pa))->cname(),
+                (*static_cast<simgrid::s4u::Host* const*>(pb))->cname());
 }
 
 xbt_dynar_t sg_hosts_as_dynar()
@@ -91,8 +91,8 @@ xbt_dynar_t sg_hosts_as_dynar()
 
   for (auto kv : host_list) {
     simgrid::s4u::Host* host = kv.second;
-    if (host && host->pimpl_netcard && host->pimpl_netcard->isHost())
-       xbt_dynar_push(res, &host);
+    if (host && host->pimpl_netpoint && host->pimpl_netpoint->isHost())
+      xbt_dynar_push(res, &host);
   }
   xbt_dynar_sort(res, hostcmp_voidp);
   return res;
@@ -101,7 +101,6 @@ xbt_dynar_t sg_hosts_as_dynar()
 // ========= Layering madness ==============*
 
 #include "src/surf/cpu_interface.hpp"
-#include "src/surf/surf_routing.hpp"
 
 // ========== User data Layer ==========
 void *sg_host_user(sg_host_t host) {