mirror of
https://github.com/sogou/workflow.git
synced 2026-10-21 14:52:26 +08:00
Fix return value of KafkaResponse::parse_response
This commit is contained in:
@@ -2818,7 +2818,7 @@ int KafkaResponse::parse_response()
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int kafka_meta_parse_broker(void **buf, size_t *size,
|
||||
@@ -3771,10 +3771,12 @@ int KafkaResponse::parse_saslhandshake(void **buf, size_t *size)
|
||||
int KafkaResponse::parse_saslauthenticate(void **buf, size_t *size)
|
||||
{
|
||||
std::string error_message;
|
||||
std::string auth_bytes;
|
||||
int16_t error = 0;
|
||||
|
||||
CHECK_RET(parse_i16(buf, size, &error));
|
||||
CHECK_RET(parse_string(buf, size, error_message));
|
||||
CHECK_RET(parse_bytes(buf, size, auth_bytes));
|
||||
|
||||
if (error != 0)
|
||||
{
|
||||
@@ -3782,9 +3784,6 @@ int KafkaResponse::parse_saslauthenticate(void **buf, size_t *size)
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::string auth_bytes;
|
||||
CHECK_RET(parse_bytes(buf, size, auth_bytes));
|
||||
|
||||
errno = 0;
|
||||
if (this->config.get_raw_ptr()->recv(auth_bytes.c_str(),
|
||||
auth_bytes.size(),
|
||||
|
||||
Reference in New Issue
Block a user