make CI happy
This commit is contained in:
parent
fdf165933d
commit
acd52c156d
|
@ -8972,9 +8972,6 @@ _exit:
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t tSerializeSMqPollReq(void *buf, int32_t bufLen, SMqPollReq *pReq) {
|
int32_t tSerializeSMqPollReq(void *buf, int32_t bufLen, SMqPollReq *pReq) {
|
||||||
int32_t code = 0;
|
|
||||||
int32_t lino;
|
|
||||||
int32_t tlen;
|
|
||||||
int32_t headLen = sizeof(SMsgHead);
|
int32_t headLen = sizeof(SMsgHead);
|
||||||
if (buf != NULL) {
|
if (buf != NULL) {
|
||||||
buf = (char *)buf + headLen;
|
buf = (char *)buf + headLen;
|
||||||
|
@ -8983,38 +8980,32 @@ int32_t tSerializeSMqPollReq(void *buf, int32_t bufLen, SMqPollReq *pReq) {
|
||||||
|
|
||||||
SEncoder encoder = {0};
|
SEncoder encoder = {0};
|
||||||
tEncoderInit(&encoder, buf, bufLen);
|
tEncoderInit(&encoder, buf, bufLen);
|
||||||
TMSG_CHECK_GOTO(tStartEncode(&encoder));
|
if (tStartEncode(&encoder) < 0) return -1;
|
||||||
|
|
||||||
TMSG_CHECK_GOTO(tEncodeCStr(&encoder, pReq->subKey));
|
if (tEncodeCStr(&encoder, pReq->subKey) < 0) return -1;
|
||||||
TMSG_CHECK_GOTO(tEncodeI8(&encoder, pReq->withTbName));
|
if (tEncodeI8(&encoder, pReq->withTbName) < 0) return -1;
|
||||||
TMSG_CHECK_GOTO(tEncodeI8(&encoder, pReq->useSnapshot));
|
if (tEncodeI8(&encoder, pReq->useSnapshot) < 0) return -1;
|
||||||
TMSG_CHECK_GOTO(tEncodeI32(&encoder, pReq->epoch));
|
if (tEncodeI32(&encoder, pReq->epoch) < 0) return -1;
|
||||||
TMSG_CHECK_GOTO(tEncodeU64(&encoder, pReq->reqId));
|
if (tEncodeU64(&encoder, pReq->reqId) < 0) return -1;
|
||||||
TMSG_CHECK_GOTO(tEncodeI64(&encoder, pReq->consumerId));
|
if (tEncodeI64(&encoder, pReq->consumerId) < 0) return -1;
|
||||||
TMSG_CHECK_GOTO(tEncodeI64(&encoder, pReq->timeout));
|
if (tEncodeI64(&encoder, pReq->timeout) < 0) return -1;
|
||||||
TMSG_CHECK_GOTO(tEncodeSTqOffsetVal(&encoder, &pReq->reqOffset));
|
if (tEncodeSTqOffsetVal(&encoder, &pReq->reqOffset) < 0) return -1;
|
||||||
TMSG_CHECK_GOTO(tEncodeI8(&encoder, pReq->enableReplay));
|
if (tEncodeI8(&encoder, pReq->enableReplay) < 0) return -1;
|
||||||
TMSG_CHECK_GOTO(tEncodeI8(&encoder, pReq->sourceExcluded));
|
if (tEncodeI8(&encoder, pReq->sourceExcluded) < 0) return -1;
|
||||||
|
|
||||||
tEndEncode(&encoder);
|
tEndEncode(&encoder);
|
||||||
|
|
||||||
tlen = encoder.pos;
|
int32_t tlen = encoder.pos;
|
||||||
|
tEncoderClear(&encoder);
|
||||||
|
|
||||||
if (buf != NULL) {
|
if (buf != NULL) {
|
||||||
SMsgHead *pHead = (SMsgHead *)((char *)buf - headLen);
|
SMsgHead *pHead = (SMsgHead *)((char *)buf - headLen);
|
||||||
pHead->vgId = htonl(pReq->head.vgId);
|
pHead->vgId = htonl(pReq->head.vgId);
|
||||||
pHead->contLen = htonl(tlen + headLen);
|
pHead->contLen = htonl(tlen + headLen);
|
||||||
}
|
}
|
||||||
TMSG_CHECK_GOTO(tEncodeI8(&encoder, pReq->enableBatchMeta));
|
if (tEncodeI8(&encoder, pReq->enableBatchMeta) < 0) return -1;
|
||||||
|
|
||||||
_exit:
|
return tlen + headLen;
|
||||||
if (code) {
|
|
||||||
tlen = code;
|
|
||||||
} else {
|
|
||||||
tlen += headLen;
|
|
||||||
}
|
|
||||||
tEncoderClear(&encoder);
|
|
||||||
return tlen;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t tDeserializeSMqPollReq(void *buf, int32_t bufLen, SMqPollReq *pReq) {
|
int32_t tDeserializeSMqPollReq(void *buf, int32_t bufLen, SMqPollReq *pReq) {
|
||||||
|
|
Loading…
Reference in New Issue