Merge pull request #1241 from kedixa/dev

kafkabugfix: OffsetCommit parse and SyncGroup encode makes bad message
This commit is contained in:
xiehan
2023-03-31 17:32:47 +08:00
committed by GitHub

View File

@@ -2611,10 +2611,7 @@ int KafkaRequest::encode_syncgroup(struct iovec vectors[], int max)
}
}
else
{
append_i32(this->msgbuf, 0);
append_bytes(this->msgbuf, "");
}
this->cur_size = this->msgbuf.size();
@@ -3625,7 +3622,7 @@ int KafkaResponse::parse_offsetcommit(void **buf, size_t *size)
int32_t partition_cnt;
int32_t partition;
if (this->api_version >= 1)
if (this->api_version >= 3)
CHECK_RET(parse_i32(buf, size, &throttle_time));
CHECK_RET(parse_i32(buf, size, &topic_cnt));