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) { ...@@ -67,6 +67,10 @@ detail::add_arg_functor<T> add_arg(std::vector<T>& storage) {
return {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. * @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) { ...@@ -157,7 +157,7 @@ void default_actor_proxy::link_to(const intrusive_ptr<actor>& other) {
if (link_to_impl(other)) { if (link_to_impl(other)) {
// causes remote actor to link to (proxy of) other // causes remote actor to link to (proxy of) other
// receiving peer will call: this->local_link_to(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) { ...@@ -165,7 +165,7 @@ void default_actor_proxy::unlink_from(const intrusive_ptr<actor>& other) {
CPPA_LOG_TRACE(CPPA_MARG(other, get)); CPPA_LOG_TRACE(CPPA_MARG(other, get));
if (unlink_from_impl(other)) { if (unlink_from_impl(other)) {
// causes remote actor to unlink from (proxy of) 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) ...@@ -173,7 +173,7 @@ bool default_actor_proxy::establish_backlink(const intrusive_ptr<actor>& other)
CPPA_LOG_TRACE(CPPA_MARG(other, get)); CPPA_LOG_TRACE(CPPA_MARG(other, get));
if (super::establish_backlink(other)) { if (super::establish_backlink(other)) {
// causes remote actor to unlink from (proxy of) 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 true;
} }
return false; return false;
...@@ -183,7 +183,7 @@ bool default_actor_proxy::remove_backlink(const intrusive_ptr<actor>& other) { ...@@ -183,7 +183,7 @@ bool default_actor_proxy::remove_backlink(const intrusive_ptr<actor>& other) {
CPPA_LOG_TRACE(CPPA_MARG(other, get)); CPPA_LOG_TRACE(CPPA_MARG(other, get));
if (super::remove_backlink(other)) { if (super::remove_backlink(other)) {
// causes remote actor to unlink from (proxy of) 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 true;
} }
return false; 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