Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of https://github.com/mpoquet/simgrid
[simgrid.git] / src / bindings / java / jmsg_as.cpp
index 8f7b031..ea41349 100644 (file)
@@ -6,8 +6,12 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "xbt/str.h"
-#include "xbt/dict.h"
+#include <xbt/str.h>
+#include <xbt/dict.h>
+#include <xbt/dynar.h>
+
+#include <simgrid/s4u/host.hpp>
+
 #include "simgrid/msg.h"
 #include "jmsg_as.h"
 #include "jmsg_host.h"
@@ -149,7 +153,7 @@ JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_As_getHosts(JNIEnv * env, jo
 
     jhost = static_cast<jobject>(host->extension(JAVA_HOST_LEVEL));
     if (!jhost) {
-      jname = env->NewStringUTF(MSG_host_get_name(host));
+      jname = env->NewStringUTF(host->cname());
 
       jhost = Java_org_simgrid_msg_Host_getByName(env, cls, jname);