Commit a0d0f67c authored by Neverlord's avatar Neverlord

fixed channel implementation

parent 3fd4d807
......@@ -50,10 +50,6 @@ intptr_t channel::compare(const abstract_channel* lhs, const abstract_channel* r
channel::channel(abstract_channel* ptr) : m_ptr(ptr) { }
void channel::enqueue(const message_header& hdr, any_tuple msg) const {
if (m_ptr) m_ptr->enqueue(hdr, std::move(msg));
}
intptr_t channel::compare(const channel& other) const {
return compare(m_ptr.get(), other.m_ptr.get());
}
......
......@@ -75,7 +75,7 @@ class local_group : public abstract_group {
<< CPPA_TARG(msg, to_string));
shared_guard guard(m_mtx);
for (auto& s : m_subscribers) {
s.enqueue(hdr, msg);
s->enqueue(hdr, msg);
}
}
......
......@@ -38,13 +38,13 @@ message_header::message_header(actor_addr source,
message_id mid)
: sender(source), receiver(dest), id(mid) { }
bool operator==(msg_hdr_cref lhs, msg_hdr_cref rhs) {
bool operator==(const message_header& lhs, const message_header& rhs) {
return lhs.sender == rhs.sender
&& lhs.receiver == rhs.receiver
&& lhs.id == rhs.id;
}
bool operator!=(msg_hdr_cref lhs, msg_hdr_cref rhs) {
bool operator!=(const message_header& lhs, const message_header& rhs) {
return !(lhs == rhs);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment