X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c882e24932c718fad85c22cb546f30e158f1b31d..88477504b135930a51dad5af1d57194c894c091b:/src/simix/smx_network.c diff --git a/src/simix/smx_network.c b/src/simix/smx_network.c index b1351cbda4..2c05fb619d 100644 --- a/src/simix/smx_network.c +++ b/src/simix/smx_network.c @@ -267,6 +267,9 @@ smx_action_t SIMIX_comm_new(e_smx_comm_type_t type) /* set communication */ act->comm.type = type; act->comm.refcount = 1; + act->comm.src_data=NULL; + act->comm.dst_data=NULL; + #ifdef HAVE_LATENCY_BOUND_TRACKING //initialize with unknown value @@ -302,7 +305,7 @@ void SIMIX_comm_destroy(smx_action_t action) } action->comm.refcount--; if (action->comm.refcount > 0) - return; + return; XBT_DEBUG("Really free communication %p; refcount is now %d", action, action->comm.refcount); @@ -494,7 +497,7 @@ smx_action_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_rdv_t rdv, }/*else{ XBT_DEBUG("Not yet finished, we have to wait %d\n", xbt_fifo_size(rdv->comm_fifo)); }*/ - // other_action->comm.refcount--; + other_action->comm.refcount--; SIMIX_comm_destroy(this_action); --smx_total_comms; // this creation was a pure waste } @@ -516,7 +519,7 @@ smx_action_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_rdv_t rdv, --smx_total_comms; // this creation was a pure waste other_action->state = SIMIX_READY; other_action->comm.type = SIMIX_COMM_READY; - // other_action->comm.refcount--; + //other_action->comm.refcount--; } xbt_fifo_push(dst_proc->comms, other_action); }