From cab831748a2a9cc18b7f18f3b5e14a4374b7ab68 Mon Sep 17 00:00:00 2001 From: lichao <lichao@aiotlink.com> Date: 星期一, 17 五月 2021 18:34:26 +0800 Subject: [PATCH] socket send using abs addr, avoid shm find by id. --- src/defs.h | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/defs.h b/src/defs.h index 5c770a7..cc3dc02 100644 --- a/src/defs.h +++ b/src/defs.h @@ -27,12 +27,12 @@ int64_t CalcAllocIndex(int64_t size); int64_t GetAllocSize(int index); -struct CenterInfo { - struct MQInfo { - int64_t id_ = 0; - int64_t offset_ = 0; - }; +struct MQInfo { + MQId id_ = 0; + int64_t offset_ = 0; +}; +struct CenterInfo { MQInfo mq_center_; MQInfo mq_bus_; MQInfo mq_init_; @@ -59,9 +59,9 @@ void GetLastError(int &ec, std::string &msg); //TODO center can check shm for previous crash. -uint64_t BHGlobalSenderAddress(); -uint64_t BHTopicCenterAddress(); -uint64_t BHTopicBusAddress(); -uint64_t BHCenterReplyAddress(); +const MQInfo &BHGlobalSenderAddress(); +const MQInfo &BHTopicCenterAddress(); +const MQInfo &BHTopicBusAddress(); +const MQInfo &BHCenterReplyAddress(); #endif // end of include guard: DEFS_KP8LKGD0 -- Gitblit v1.8.0