From 4bc481663a28a90244e3531b432a27a7a90a49ac Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Sat, 12 Feb 2022 14:17:08 +0800 Subject: [PATCH] fix crash DDL --- source/libs/transport/src/transCli.c | 2 +- source/libs/transport/src/transSrv.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 6630cd7d31..9d13ec8225 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -405,7 +405,7 @@ static void clientWrite(SCliConn* pConn) { pConn->secured = 1; // del later pHead = (STransMsgHead*)buf; - pHead->secured = 0; + pHead->secured = 1; msgLen += sizeof(STransUserMsg); } diff --git a/source/libs/transport/src/transSrv.c b/source/libs/transport/src/transSrv.c index a731024aba..cc9933f919 100644 --- a/source/libs/transport/src/transSrv.c +++ b/source/libs/transport/src/transSrv.c @@ -231,7 +231,7 @@ static void uvHandleReq(SSrvConn* pConn) { p->chandle = NULL; STransMsgHead* pHead = (STransMsgHead*)p->msg; - if (pHead->secured == 0) { + if (pHead->secured == 1) { STransUserMsg* uMsg = (p->msg + p->msgLen - sizeof(STransUserMsg)); memcpy(pConn->user, uMsg->user, tListLen(uMsg->user)); } -- GitLab