From 02ba913dc7bb5d711471b27f2ea23a897d0f2e28 Mon Sep 17 00:00:00 2001 From: lichao <lichao@aiotlink.com> Date: 星期五, 23 四月 2021 15:34:26 +0800 Subject: [PATCH] bind msgi to shm, change offset_ptr to abs offset. --- src/topic_node.cpp | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/topic_node.cpp b/src/topic_node.cpp index 4f0c96f..a5d48b7 100644 --- a/src/topic_node.cpp +++ b/src/topic_node.cpp @@ -111,7 +111,7 @@ return sock.Send(&BHTopicCenterAddress(), head, body, onResult); } else { MsgI reply; - DEFER1(reply.Release(shm_);); + DEFER1(reply.Release();); BHMsgHead reply_head; bool r = sock.SendAndRecv(&BHTopicCenterAddress(), head, body, reply, reply_head, timeout_ms); if (r) { @@ -139,7 +139,7 @@ return sock.Send(&BHTopicCenterAddress(), head, body); } else { MsgI reply; - DEFER1(reply.Release(shm_);); + DEFER1(reply.Release();); BHMsgHead reply_head; bool r = sock.SendAndRecv(&BHTopicCenterAddress(), head, body, reply, reply_head, timeout_ms); r = r && reply_head.type() == kMsgTypeCommonReply && reply.ParseBody(reply_body); @@ -172,7 +172,7 @@ return sock.Send(&BHTopicCenterAddress(), head, body); } else { MsgI reply; - DEFER1(reply.Release(shm_);); + DEFER1(reply.Release();); BHMsgHead reply_head; bool r = sock.SendAndRecv(&BHTopicCenterAddress(), head, body, reply, reply_head, timeout_ms); r = r && reply_head.type() == kMsgTypeCommonReply; @@ -366,7 +366,7 @@ head.set_topic(request.topic()); MsgI reply_msg; - DEFER1(reply_msg.Release(shm_);); + DEFER1(reply_msg.Release();); BHMsgHead reply_head; if (sock.SendAndRecv(addr.mq_id().data(), head, request, reply_msg, reply_head, timeout_ms) && @@ -403,7 +403,7 @@ AddRoute(head, sock.id()); MsgI reply; - DEFER1(reply.Release(shm_)); + DEFER1(reply.Release()); BHMsgHead reply_head; if (sock.SendAndRecv(&BHTopicCenterAddress(), head, query, reply, reply_head, timeout_ms)) { @@ -442,7 +442,7 @@ return sock.Send(&BHTopicBusAddress(), head, pub); } else { MsgI reply; - DEFER1(reply.Release(shm());); + DEFER1(reply.Release();); BHMsgHead reply_head; MsgCommonReply reply_body; return sock.SendAndRecv(&BHTopicBusAddress(), head, pub, reply, reply_head, timeout_ms) && @@ -475,7 +475,7 @@ return sock.Send(&BHTopicBusAddress(), head, sub); } else { MsgI reply; - DEFER1(reply.Release(shm());); + DEFER1(reply.Release();); BHMsgHead reply_head; return sock.SendAndRecv(&BHTopicBusAddress(), head, sub, reply, reply_head, timeout_ms) && reply_head.type() == kMsgTypeCommonReply && @@ -515,7 +515,7 @@ auto &sock = SockSub(); MsgI msg; - DEFER1(msg.Release(shm());); + DEFER1(msg.Release();); BHMsgHead head; //TODO error msg. if (sock.SyncRecv(msg, head, timeout_ms) && head.type() == kMsgTypePublish) { -- Gitblit v1.8.0