From 4d5e8745efb152a308794bdac0931d4f3a2fca0f Mon Sep 17 00:00:00 2001 From: Mark Stillwell Date: Sun, 3 Jul 2011 21:26:32 +0200 Subject: [PATCH 1/1] fixed a bug in comm_copy_data, it wasn't handling messages with zero-size buffers correctly. --- src/simix/smx_network.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/simix/smx_network.c b/src/simix/smx_network.c index 1325aac2ae..d16566faf9 100644 --- a/src/simix/smx_network.c +++ b/src/simix/smx_network.c @@ -845,10 +845,8 @@ void SIMIX_comm_copy_data(smx_action_t comm) if (comm->comm.dst_buff_size) *comm->comm.dst_buff_size = buff_size; - if (buff_size == 0) - return; - - (*SIMIX_comm_copy_data_callback) (comm, buff_size); + if (buff_size > 0) + (*SIMIX_comm_copy_data_callback) (comm, buff_size); /* Set the copied flag so we copy data only once */ /* (this function might be called from both communication ends) */ -- 2.20.1