From 58e3540930d290b315fd24d0414c8feeb7bc8bc1 Mon Sep 17 00:00:00 2001 From: lichao <lichao@aiotlink.com> Date: 星期日, 25 四月 2021 10:15:43 +0800 Subject: [PATCH] query topic add dest param. --- src/topic_node.cpp | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/topic_node.cpp b/src/topic_node.cpp index 24bc4bb..00db773 100644 --- a/src/topic_node.cpp +++ b/src/topic_node.cpp @@ -187,7 +187,7 @@ return Heartbeat(proc, reply_body, timeout_ms); } -bool TopicNode::QueryTopicAddress(MsgQueryTopic &query, MsgQueryTopicReply &reply_body, const int timeout_ms) +bool TopicNode::QueryTopicAddress(BHAddress &dest, MsgQueryTopic &query, MsgQueryTopicReply &reply_body, const int timeout_ms) { if (!IsOnline()) { SetLastError(eNotRegistered, "Not Registered."); @@ -417,7 +417,8 @@ MsgQueryTopic query; query.set_topic(topic); MsgQueryTopicReply rep; - if (QueryTopicAddress(query, rep, timeout_ms)) { + BHAddress dest; // empty means local. + if (QueryTopicAddress(dest, query, rep, timeout_ms)) { auto &ls = rep.node_address(); n = ls.size(); for (auto &na : ls) { -- Gitblit v1.8.0