@@ -311,7 +311,6 @@ static int32_t tSerializeSClientHbReq(SEncoder *pEncoder, const SClientHbReq *pR
311311 }
312312 TAOS_CHECK_RETURN (tEncodeU32 (pEncoder , pReq -> userIp ));
313313 TAOS_CHECK_RETURN (tEncodeCStr (pEncoder , pReq -> userApp ));
314- TAOS_CHECK_RETURN (tSerializeIpRange (pEncoder , (SIpRange * )& pReq -> userDualIp ));
315314
316315 return 0 ;
317316}
@@ -443,10 +442,6 @@ static int32_t tDeserializeSClientHbReq(SDecoder *pDecoder, SClientHbReq *pReq)
443442 TAOS_CHECK_GOTO (tDecodeCStrTo (pDecoder , pReq -> userApp ), & line , _error );
444443 }
445444
446- if (!tDecodeIsEnd (pDecoder )) {
447- TAOS_CHECK_GOTO (tDeserializeIpRange (pDecoder , (SIpRange * )& pReq -> userDualIp ), & line , _error );
448- }
449-
450445_error :
451446 if (code != 0 ) {
452447 tFreeClientHbReq (pReq );
@@ -551,6 +546,12 @@ int32_t tSerializeSClientHbBatchReq(void *buf, int32_t bufLen, const SClientHbBa
551546 }
552547
553548 TAOS_CHECK_EXIT (tEncodeI64 (& encoder , pBatchReq -> ipWhiteListVer ));
549+
550+ for (int32_t i = 0 ; i < reqNum ; i ++ ) {
551+ SClientHbReq * pReq = taosArrayGet (pBatchReq -> reqs , i );
552+ TAOS_CHECK_EXIT (tSerializeIpRange (& encoder , (SIpRange * )& pReq -> userDualIp ));
553+ }
554+
554555 tEndEncode (& encoder );
555556
556557_exit :
@@ -592,6 +593,12 @@ int32_t tDeserializeSClientHbBatchReq(void *buf, int32_t bufLen, SClientHbBatchR
592593 TAOS_CHECK_EXIT (tDecodeI64 (& decoder , & pBatchReq -> ipWhiteListVer ));
593594 }
594595
596+ if (!tDecodeIsEnd (& decoder )) {
597+ for (int32_t i = 0 ; i < reqNum ; i ++ ) {
598+ SClientHbReq * pReq = taosArrayGet (pBatchReq -> reqs , i );
599+ TAOS_CHECK_EXIT (tDeserializeIpRange (& decoder , (SIpRange * )& pReq -> userDualIp ));
600+ }
601+ }
595602 tEndDecode (& decoder );
596603
597604_exit :
0 commit comments