Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Ensure that MSG_host_self() works from maestro context
[simgrid.git] / src / msg / msg_process.c
index a14e882..927a4a9 100644 (file)
@@ -53,6 +53,7 @@ void MSG_process_cleanup_from_SIMIX(smx_process_t smx_proc)
 
   // free the MSG process
   xbt_free(msg_proc);
+  SIMIX_process_cleanup(smx_proc);
 }
 
 /* This function creates a MSG process. It has the prototype enforced by SIMIX_function_register_process_create */
@@ -293,7 +294,7 @@ msg_host_t MSG_process_get_host(msg_process_t process)
   else {
     simdata = simcall_process_get_data(process);
   }
-  return simdata->m_host;
+  return simdata ? simdata->m_host : NULL;
 }
 
 /** \ingroup m_process_management