From f379abe55c43883810a09e69f3b8d40912c815aa Mon Sep 17 00:00:00 2001 From: slzhou Date: Thu, 14 Dec 2023 15:25:57 +0800 Subject: [PATCH] fix: message compatibility --- source/common/src/tmsg.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 5cd308067e..918632b7e7 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -4337,7 +4337,11 @@ int32_t tDeserializeSRetrieveTableReq(void *buf, int32_t bufLen, SRetrieveTableR if (tDecodeCStrTo(&decoder, pReq->tb) < 0) return -1; if (tDecodeCStrTo(&decoder, pReq->filterTb) < 0) return -1; if (tDecodeCStrTo(&decoder, pReq->user) < 0) return -1; - if (tDecodeI64(&decoder, &pReq->compactId) < 0) return -1; + if (!tDecodeIsEnd(&decoder)) { + if (tDecodeI64(&decoder, &pReq->compactId) < 0) return -1; + } else { + pReq->compactId = -1; + } tEndDecode(&decoder); tDecoderClear(&decoder);