Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 16 Feb 2017 10:36:21 +0000 (11:36 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 16 Feb 2017 10:36:21 +0000 (11:36 +0100)
src/simix/smx_network.cpp

index 63171c5..c17b27b 100644 (file)
@@ -639,13 +639,18 @@ void SIMIX_comm_finish(smx_activity_t synchro)
         if(comm->dst_proc)
           xbt_fifo_remove(comm->dst_proc->comms, synchro);
       }
-      if(simcall->issuer == comm->dst_proc){
+      else if(simcall->issuer == comm->dst_proc){
         if(comm->src_proc)
           xbt_fifo_remove(comm->src_proc->comms, synchro);
         //in case of a detached comm we have an extra ref to remove, as the sender won't do it
         destroy_count++;
       }
+      else{
+        xbt_fifo_remove(comm->dst_proc->comms, synchro);
+        xbt_fifo_remove(comm->src_proc->comms, synchro);
+      }
     }
+
     SIMIX_simcall_answer(simcall);
     destroy_count++;
   }