Index: message_queue.hpp =================================================================== --- message_queue.hpp (revision 61644) +++ message_queue.hpp (working copy) @@ -491,14 +491,14 @@ //Copy user buffer to the message std::memcpy(free_msg->data(), buffer, buffer_size); -// bool was_empty = p_hdr->is_empty(); + bool was_empty = p_hdr->is_empty(); //Insert the first free message in the priority queue p_hdr->queue_free_msg(); //If this message changes the queue empty state, notify it to receivers -// if (was_empty){ + if (was_empty){ p_hdr->m_cond_recv.notify_one(); -// } + } } // Lock end return true; @@ -587,15 +587,15 @@ //Copy data to receiver's bufers std::memcpy(buffer, top_msg->data(), recvd_size); -// bool was_full = p_hdr->is_full(); + bool was_full = p_hdr->is_full(); //Free top message and put it in the free message list p_hdr->free_top_msg(); //If this reception changes the queue full state, notify senders -// if (was_full){ + if (was_full){ p_hdr->m_cond_send.notify_one(); -// } + } } //Lock end return true;