Commit 123e0d3f authored by Dominik Charousset's avatar Dominik Charousset

fix bug in forwarding of link operations

parent f9cad67e
......@@ -67,6 +67,10 @@ detail::add_arg_functor<T> add_arg(std::vector<T>& storage) {
return {storage};
}
inline std::function<void()> set_flag(bool& storage) {
return [&] { storage = true; };
}
/**
* @brief Stores a help text along with the number of expected arguments.
*/
......
......@@ -157,7 +157,7 @@ void default_actor_proxy::link_to(const intrusive_ptr<actor>& other) {
if (link_to_impl(other)) {
// causes remote actor to link to (proxy of) other
// receiving peer will call: this->local_link_to(other)
forward_msg(this, make_any_tuple(atom("LINK"), other));
forward_msg({this, this}, make_any_tuple(atom("LINK"), other));
}
}
......@@ -165,7 +165,7 @@ void default_actor_proxy::unlink_from(const intrusive_ptr<actor>& other) {
CPPA_LOG_TRACE(CPPA_MARG(other, get));
if (unlink_from_impl(other)) {
// causes remote actor to unlink from (proxy of) other
forward_msg(this, make_any_tuple(atom("UNLINK"), other));
forward_msg({this, this}, make_any_tuple(atom("UNLINK"), other));
}
}
......@@ -173,7 +173,7 @@ bool default_actor_proxy::establish_backlink(const intrusive_ptr<actor>& other)
CPPA_LOG_TRACE(CPPA_MARG(other, get));
if (super::establish_backlink(other)) {
// causes remote actor to unlink from (proxy of) other
forward_msg(this, make_any_tuple(atom("LINK"), other));
forward_msg({this, this}, make_any_tuple(atom("LINK"), other));
return true;
}
return false;
......@@ -183,7 +183,7 @@ bool default_actor_proxy::remove_backlink(const intrusive_ptr<actor>& other) {
CPPA_LOG_TRACE(CPPA_MARG(other, get));
if (super::remove_backlink(other)) {
// causes remote actor to unlink from (proxy of) other
forward_msg(this, make_any_tuple(atom("UNLINK"), other));
forward_msg({this, this}, make_any_tuple(atom("UNLINK"), other));
return true;
}
return false;
......
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