Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] when a process migrates, we need to clean-up its container properly (includin...
authorLucas Schnorr <Lucas.Schnorr@imag.fr>
Fri, 20 Jan 2012 15:02:10 +0000 (16:02 +0100)
committerLucas Schnorr <Lucas.Schnorr@imag.fr>
Sun, 22 Jan 2012 23:55:24 +0000 (00:55 +0100)
src/instr/instr_msg_process.c

index c752a1b..ec0d9b4 100644 (file)
@@ -48,7 +48,9 @@ void TRACE_msg_process_change_host(m_process_t process, m_host_t old_host, m_hos
     new_pajeStartLink (MSG_get_clock(), getRootContainer(), type, msg, "M", key);
 
     //destroy existing container of this process
-    destroyContainer(getContainer(instr_process_id(process, str, len)));
+    container_t existing_container = getContainer(instr_process_id(process, str, len));
+    removeContainerFromParent (existing_container);
+    destroyContainer(existing_container);
 
     //create new container on the new_host location
     msg = newContainer(instr_process_id(process, str, len), INSTR_MSG_PROCESS, getContainer(new_host->name));