From 5b6ced44157b6e7fab519ae48f5cffcdc2b3cd7c Mon Sep 17 00:00:00 2001 From: lichao <lichao@aiotlink.com> Date: 星期日, 25 四月 2021 19:28:57 +0800 Subject: [PATCH] use node mqid ssn id to index online nodes. --- src/proto.cpp | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/proto.cpp b/src/proto.cpp index b1e8207..c8a5052 100644 --- a/src/proto.cpp +++ b/src/proto.cpp @@ -32,17 +32,18 @@ std::string NewMsgId() { return RandId(); } -BHMsgHead InitMsgHead(const MsgType type, const std::string &proc_id) +BHMsgHead InitMsgHead(const MsgType type, const std::string &proc_id, const uint64_t ssn_id) { - return InitMsgHead(type, proc_id, RandId()); + return InitMsgHead(type, proc_id, ssn_id, RandId()); } -BHMsgHead InitMsgHead(const MsgType type, const std::string &proc_id, const std::string &msgid) +BHMsgHead InitMsgHead(const MsgType type, const std::string &proc_id, const uint64_t ssn_id, const std::string &msgid) { BHMsgHead msg; msg.set_msg_id(msgid); msg.set_type(type); msg.set_proc_id(proc_id); + msg.set_ssn_id(ssn_id); msg.set_timestamp(NowSec()); return msg; } -- Gitblit v1.8.0