lichao
2021-06-03 d89ff0ad812cdf178b911843bc3e8c04b2f00845
src/bh_api.cc
@@ -36,10 +36,7 @@
   static std::unique_ptr<TopicNode> ptr;
   if (!ptr && GlobalInit(BHomeShm())) {
      auto InitLog = []() {
         auto id = GetProcExe();
         char path[200] = {0};
         sprintf(path, "/opt/vasystem/valog/bhshmq_node_%s.log", id.c_str());
         ns_log::AddLog(path);
         ns_log::AddLog(BHLogDir() + "bhshmq_node_" + GetProcExe() + ".log");
         return true;
      };
      static bool init_log = InitLog();
@@ -194,6 +191,19 @@
       remote, remote_len, topic, topic_len, reply, reply_len, timeout_ms);
}
int BHQueryProcs(const void *remote,
                 const int remote_len,
                 const void *query,
                 const int query_len,
                 void **reply,
                 int *reply_len,
                 const int timeout_ms)
{
   return BHApi_In2_Out1<BHAddress, MsgQueryProc, MsgQueryProcReply>(
       &TopicNode::QueryProcs,
       remote, remote_len, query, query_len, reply, reply_len, timeout_ms);
}
int BHSubscribeTopics(const void *topics, const int topics_len, void **reply, int *reply_len, const int timeout_ms)
{
   return BHApi_In1_Out1<MsgTopicList>(&TopicNode::Subscribe, topics, topics_len, reply, reply_len, timeout_ms);