Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
actually kill models' names
[simgrid.git] / src / bindings / java / jmsg.c
index c11ba91..685e2b3 100644 (file)
@@ -6,7 +6,7 @@
 /* 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 <msg/msg.h>
+#include <simgrid/msg.h>
 #include <simgrid/simix.h>
 #include <surf/surfxml_parse.h>
 #include <locale.h>
@@ -104,9 +104,7 @@ Java_org_simgrid_msg_Msg_init(JNIEnv * env, jclass cls, jobjectArray jargs)
   const char *tmp;
 
   XBT_LOG_CONNECT(jmsg);
-#ifdef HAVE_TRACING
   XBT_LOG_CONNECT(jtrace);
-#endif
 
   (*env)->GetJavaVM(env, &__java_vm);
 
@@ -126,12 +124,12 @@ Java_org_simgrid_msg_Msg_init(JNIEnv * env, jclass cls, jobjectArray jargs)
 
   argc++;
   argv = xbt_new(char *, argc + 1);
-  argv[0] = strdup("java");
+  argv[0] = xbt_strdup("java");
 
   for (index = 0; index < argc - 1; index++) {
     jval = (jstring) (*env)->GetObjectArrayElement(env, jargs, index);
     tmp = (*env)->GetStringUTFChars(env, jval, 0);
-    argv[index + 1] = strdup(tmp);
+    argv[index + 1] = xbt_strdup(tmp);
     (*env)->ReleaseStringUTFChars(env, jval, tmp);
   }
   argv[argc] = NULL;
@@ -322,4 +320,3 @@ static int create_jprocess(int argc, char *argv[]) {
 
   return 0;
 }
-