Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cosmetics in SMPI and bugfix for a nasty bug in SIMIX (failed to destroy surf actions).
[simgrid.git] / src / simix / smx_network.c
index 113c21b..0fa9ca3 100644 (file)
@@ -325,7 +325,7 @@ void SIMIX_network_set_copy_data_callback(void (*callback)(smx_comm_t, size_t))
 }
 
 void SIMIX_network_copy_pointer_callback(smx_comm_t comm, size_t buff_size) {
-  xbt_assert1((buff_size == sizeof(void*)), "Cannot copy %d bytes: must be sizeof(void*)",buff_size);
+  xbt_assert1((buff_size == sizeof(void*)), "Cannot copy %zu bytes: must be sizeof(void*)",buff_size);
   *(void**)(comm->dst_buff) = comm->src_buff;
 }
 
@@ -517,6 +517,7 @@ unsigned int SIMIX_network_waitany(xbt_dynar_t comms) {
     SIMIX_communication_destroy(comm_finished);
     THROW0(network_error, 0, "Link failure");
   }
+  SIMIX_communication_destroy(comm_finished);
 
   return found_comm;
 }