diff options
Diffstat (limited to 'mmss/iface.cpp')
-rw-r--r-- | mmss/iface.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/mmss/iface.cpp b/mmss/iface.cpp index f54c1ea..38808f1 100644 --- a/mmss/iface.cpp +++ b/mmss/iface.cpp @@ -37,11 +37,9 @@ void dispatch(const std::shared_ptr<packet_t> &packet) { if (!source || !dest) return; - auto node = dest->node.lock(); - if (!node) - return; + node_t *node = dest->node; - node->proto->handle_packet(node.get(), node->ctx, dest.get(), &source->address, packet->data.get(), packet->len); + node->proto->handle_packet(node, node->ctx, dest.get(), &source->address, packet->data.get(), packet->len); } void add_iface(const std::shared_ptr<node_t> &node, const std::shared_ptr<network_t> &net, const std::string &name, const gmrf_addr_t *address) { @@ -50,8 +48,8 @@ void add_iface(const std::shared_ptr<node_t> &node, const std::shared_ptr<networ iface->name = name; iface->address = *address; - iface->node = node; - iface->net = net; + iface->node = node.get(); + iface->net = net.get(); node->interfaces.push_back(iface); net->interfaces.push_back(iface); |