From 1cb3fb33327fb80169d6d7303937a1611a762b33 Mon Sep 17 00:00:00 2001 From: luciferWei Date: Mon, 18 Aug 2025 11:24:09 +0800 Subject: [PATCH 1/5] =?UTF-8?q?Feat=EF=BC=9A=E8=A7=A3=E5=86=B3session?= =?UTF-8?q?=E4=BB=BF=E5=86=92=20=20\nSigned-off-by:=20LuciferWei=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: luciferWei --- src/daemon/daemon.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/daemon/daemon.cpp b/src/daemon/daemon.cpp index bd804386..94a98e30 100755 --- a/src/daemon/daemon.cpp +++ b/src/daemon/daemon.cpp @@ -733,7 +733,7 @@ bool HdcDaemon::HandDaemonAuth(HSession hSession, const uint32_t channelId, Sess return true; } else if (GetSessionAuthStatus(hSession->sessionId) == AUTH_OK) { WRITE_LOG(LOG_INFO, "session %u already auth ok", hSession->sessionId); - return true; + return false; } if (handshake.authType == AUTH_NONE) { @@ -875,6 +875,11 @@ bool HdcDaemon::DaemonSessionHandshake(HSession hSession, const uint32_t channel return false; } if (handshake.authType == AUTH_NONE) { + if (GetSessionAuthStatus(handshake.sessionId) != AUTH_NONE) { + WRITE_LOG(LOG_FATAL, "session %u is already, But now session is %u, refused!", + handshake.sessionId, hSession->sessionId); + return false; + } DaemonSessionHandshakeInit(hSession, handshake); } if (!HandDaemonAuth(hSession, channelId, handshake)) { -- Gitee From 6940fb923e5c370c629598f1c876ba28e88b3fba Mon Sep 17 00:00:00 2001 From: lucifer <9506160+luciferWei@user.noreply.gitee.com> Date: Sat, 23 Aug 2025 07:40:51 +0000 Subject: [PATCH 2/5] update src/daemon/daemon.cpp. Signed-off-by: lucifer <9506160+luciferWei@user.noreply.gitee.com> --- src/daemon/daemon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/daemon/daemon.cpp b/src/daemon/daemon.cpp index 94a98e30..7a2402de 100755 --- a/src/daemon/daemon.cpp +++ b/src/daemon/daemon.cpp @@ -733,7 +733,7 @@ bool HdcDaemon::HandDaemonAuth(HSession hSession, const uint32_t channelId, Sess return true; } else if (GetSessionAuthStatus(hSession->sessionId) == AUTH_OK) { WRITE_LOG(LOG_INFO, "session %u already auth ok", hSession->sessionId); - return false; + return true; } if (handshake.authType == AUTH_NONE) { -- Gitee From 753f19c1d17b1079ab25ffec2802ae6b6ec1eb8b Mon Sep 17 00:00:00 2001 From: luciferWei Date: Sat, 23 Aug 2025 16:05:58 +0800 Subject: [PATCH 3/5] =?UTF-8?q?Feat=EF=BC=9A=E8=A7=A3=E5=86=B3session?= =?UTF-8?q?=E4=BB=BF=E5=86=92=20=20\nSigned-off-by:=20LuciferWei=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: luciferWei --- src/daemon/daemon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/daemon/daemon.cpp b/src/daemon/daemon.cpp index 94a98e30..7a2402de 100755 --- a/src/daemon/daemon.cpp +++ b/src/daemon/daemon.cpp @@ -733,7 +733,7 @@ bool HdcDaemon::HandDaemonAuth(HSession hSession, const uint32_t channelId, Sess return true; } else if (GetSessionAuthStatus(hSession->sessionId) == AUTH_OK) { WRITE_LOG(LOG_INFO, "session %u already auth ok", hSession->sessionId); - return false; + return true; } if (handshake.authType == AUTH_NONE) { -- Gitee From f328a48db65627fbcae01745c0230131d4f02d90 Mon Sep 17 00:00:00 2001 From: luciferWei Date: Sat, 23 Aug 2025 16:05:58 +0800 Subject: [PATCH 4/5] =?UTF-8?q?Feat=EF=BC=9A=E8=A7=A3=E5=86=B3session?= =?UTF-8?q?=E4=BB=BF=E5=86=92=20=20\nSigned-off-by:=20LuciferWei=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: luciferWei --- src/daemon/daemon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/daemon/daemon.cpp b/src/daemon/daemon.cpp index 94a98e30..7a2402de 100755 --- a/src/daemon/daemon.cpp +++ b/src/daemon/daemon.cpp @@ -733,7 +733,7 @@ bool HdcDaemon::HandDaemonAuth(HSession hSession, const uint32_t channelId, Sess return true; } else if (GetSessionAuthStatus(hSession->sessionId) == AUTH_OK) { WRITE_LOG(LOG_INFO, "session %u already auth ok", hSession->sessionId); - return false; + return true; } if (handshake.authType == AUTH_NONE) { -- Gitee From 322ab4473e256ee2419de4dec7db63376a46afe7 Mon Sep 17 00:00:00 2001 From: lucifer <9506160+luciferWei@user.noreply.gitee.com> Date: Sat, 23 Aug 2025 08:34:44 +0000 Subject: [PATCH 5/5] Revert "update src/daemon/daemon.cpp." This reverts commit 6940fb923e5c370c629598f1c876ba28e88b3fba. --- src/daemon/daemon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/daemon/daemon.cpp b/src/daemon/daemon.cpp index 7a2402de..94a98e30 100755 --- a/src/daemon/daemon.cpp +++ b/src/daemon/daemon.cpp @@ -733,7 +733,7 @@ bool HdcDaemon::HandDaemonAuth(HSession hSession, const uint32_t channelId, Sess return true; } else if (GetSessionAuthStatus(hSession->sessionId) == AUTH_OK) { WRITE_LOG(LOG_INFO, "session %u already auth ok", hSession->sessionId); - return true; + return false; } if (handshake.authType == AUTH_NONE) { -- Gitee