Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
actually kill models' names
[simgrid.git] / src / bindings / java / jmsg_host.c
index 7c013ea..5549651 100644 (file)
@@ -77,7 +77,7 @@ Java_org_simgrid_msg_Host_getByName(JNIEnv * env, jclass cls,
   }
   const char *name = (*env)->GetStringUTFChars(env, jname, 0);
   /* get the host by name       (the hosts are created during the grid resolution) */
-  host = MSG_get_host_by_name(name);
+  host = MSG_host_by_name(name);
 
   if (!host) {                  /* invalid name */
     jxbt_throw_host_not_found(env, name);
@@ -245,7 +245,7 @@ Java_org_simgrid_msg_Host_setProperty(JNIEnv *env, jobject jhost, jobject jname,
   }
   const char *name = (*env)->GetStringUTFChars(env, jname, 0);
   const char *value_java = (*env)->GetStringUTFChars(env, jvalue, 0);
-  char *value = strdup(value_java);
+  char *value = xbt_strdup(value_java);
 
   MSG_host_set_property_value(host, name, value, xbt_free_f);