Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Mmm. Time to bed
[simgrid.git] / src / gras / Virtu / sg_dns.c
index 1d67ee4..509b89d 100644 (file)
@@ -11,5 +11,9 @@
 #include "gras/Virtu/virtu_sg.h"
 
 const char *gras_os_myname(void) {
-   return MSG_host_get_name(MSG_host_self());
+  smx_process_t process = SIMIX_process_self();
+  if ((process != NULL) && (process->simdata))
+   return SIMIX_host_get_name(SIMIX_host_self());
+  else 
+    return "";
 }