From e607f5a16e7f818040a73f6a0007aeb9e961f8c7 Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Thu, 2 Jun 2022 21:01:24 +0800 Subject: [PATCH] fix: add htonl to numOfBlocks --- include/common/tmsg.h | 1 + source/common/src/tmsg.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 768f02d9ba..972181f77e 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -241,6 +241,7 @@ typedef struct { int32_t schemaLen; // schema length, if length is 0, no schema exists int16_t numOfRows; // total number of rows in current submit block // head of SSubmitBlk + int32_t numOfBlocks; const void* pMsg; } SSubmitMsgIter; diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 9c6c532bcd..e7ee164be7 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -35,6 +35,7 @@ int32_t tInitSubmitMsgIter(const SSubmitReq *pMsg, SSubmitMsgIter *pIter) { } pIter->totalLen = htonl(pMsg->length); + pIter->numOfBlocks = htonl(pMsg->numOfBlocks); ASSERT(pIter->totalLen > 0); pIter->len = 0; pIter->pMsg = pMsg;