From 1fbfef2a51db4a3bac9d8a5b87af94a40a913b7a Mon Sep 17 00:00:00 2001
From: lichao <lichao@aiotlink.com>
Date: 星期日, 25 四月 2021 15:33:40 +0800
Subject: [PATCH] change mqid from uuid to uint64.

---
 src/sendq.cpp |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/sendq.cpp b/src/sendq.cpp
index 54de419..5b57d72 100644
--- a/src/sendq.cpp
+++ b/src/sendq.cpp
@@ -19,7 +19,7 @@
 #include "shm_queue.h"
 #include <chrono>
 
-int SendQ::DoSend1Remote(bhome_shm::ShmMsgQueue &mq, const Remote &remote, Array &arr)
+int SendQ::DoSend1Remote(bhome_shm::ShmMsgQueue &mq, const Remote remote, Array &arr)
 {
 	auto FirstNotExpired = [](Array &l) {
 		auto Less = [](const TimedMsg &msg, const TimePoint &tp) { return msg.expire() < tp; };
@@ -41,7 +41,7 @@
 		bool r = false;
 		if (d.index() == 0) {
 			auto &msg = boost::variant2::get<0>(pos->data().data_);
-			r = mq.TrySend(*(MQId *) remote.data(), msg);
+			r = mq.TrySend(remote, msg);
 			if (r) {
 				msg.Release();
 			}
@@ -50,7 +50,7 @@
 			MsgI msg;
 			if (msg.Make(content)) {
 				DEFER1(msg.Release(););
-				r = mq.TrySend(*(MQId *) remote.data(), msg);
+				r = mq.TrySend(remote, msg);
 			}
 		}
 		return r;
@@ -65,7 +65,7 @@
 	return nprocessed;
 }
 
-int SendQ::DoSend1Remote(bhome_shm::ShmMsgQueue &mq, const Remote &remote, ArrayList &al)
+int SendQ::DoSend1Remote(bhome_shm::ShmMsgQueue &mq, const Remote remote, ArrayList &al)
 {
 	int nsend = 0;
 	auto AllSent = [&](Array &arr) {

--
Gitblit v1.8.0