other_comm->dst_proc=mbox->permanent_receiver.get();
other_comm = static_cast<simgrid::kernel::activity::CommImpl*>(SIMIX_comm_ref(other_comm));
mbox->done_comm_queue.push_back(other_comm);
- XBT_DEBUG("pushing a message into the permanent receive list %p, comm %p", mbox, &(other_comm));
+ XBT_DEBUG("pushing a message into the permanent receive list %p, comm %p", mbox, other_comm);
}else{
mbox->push(this_comm);
} else {
XBT_DEBUG("Receive already pushed");
SIMIX_comm_unref(this_comm);
+ SIMIX_comm_unref(this_comm);
other_comm->state = SIMIX_READY;
other_comm->type = SIMIX_COMM_READY;
//communication already done, get it inside the list of completed comms
if (mbox->permanent_receiver != nullptr && not mbox->done_comm_queue.empty()) {
+ SIMIX_comm_unref(this_synchro);
XBT_DEBUG("We have a comm that has probably already been received, trying to match it, to skip the communication");
//find a match in the list of already received comms
other_comm = _find_matching_comm(&mbox->done_comm_queue, SIMIX_COMM_SEND, match_fun, data, this_synchro,
other_comm->state = SIMIX_DONE;
other_comm->type = SIMIX_COMM_DONE;
other_comm->mbox = nullptr;
+ SIMIX_comm_unref(other_comm);
}
SIMIX_comm_unref(other_comm);
SIMIX_comm_unref(this_synchro);