From 6d948d8345cb9b837123ed51f6c8ce9d6d3de17c Mon Sep 17 00:00:00 2001 From: cadem Date: Fri, 21 Apr 2023 09:50:54 +0800 Subject: [PATCH] message compatible --- source/common/src/tmsg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 8c73a45832..85c150066d 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -4213,7 +4213,7 @@ int32_t tDeserializeSCreateVnodeReq(void *buf, int32_t bufLen, SCreateVnodeReq * for (int32_t i = 0; i < 8; ++i) { if (tDecodeI64(&decoder, &pReq->reserved[i]) < 0) return -1; } - if (tDecodeIsEnd(&decoder)) { + if (!tDecodeIsEnd(&decoder)) { if (tDecodeI8(&decoder, &pReq->learnerReplica) < 0) return -1; if (tDecodeI8(&decoder, &pReq->learnerSelfIndex) < 0) return -1; for (int32_t i = 0; i < TSDB_MAX_LEARNER_REPLICA; ++i) { @@ -4476,7 +4476,7 @@ int32_t tDeserializeSAlterVnodeReplicaReq(void *buf, int32_t bufLen, SAlterVnode for (int32_t i = 0; i < 8; ++i) { if (tDecodeI64(&decoder, &pReq->reserved[i]) < 0) return -1; } - if (tDecodeIsEnd(&decoder)) { + if (!tDecodeIsEnd(&decoder)) { if (tDecodeI8(&decoder, &pReq->learnerSelfIndex) < 0) return -1; if (tDecodeI8(&decoder, &pReq->learnerReplica) < 0) return -1; for (int32_t i = 0; i < TSDB_MAX_LEARNER_REPLICA; ++i) { @@ -4818,7 +4818,7 @@ int32_t tDeserializeSDCreateMnodeReq(void *buf, int32_t bufLen, SDCreateMnodeReq SReplica *pReplica = &pReq->replicas[i]; if (tDecodeSReplica(&decoder, pReplica) < 0) return -1; } - if (tDecodeIsEnd(&decoder)) { + if (!tDecodeIsEnd(&decoder)) { if (tDecodeI8(&decoder, &pReq->learnerReplica) < 0) return -1; for (int32_t i = 0; i < TSDB_MAX_LEARNER_REPLICA; ++i) { SReplica *pReplica = &pReq->learnerReplicas[i]; -- GitLab