[core,gateway] always return in case of error
Currently, the `arm_handle_bad_request` function returns `FALSE` when the `cJSON_ParseWithLength` function fails to parse the message, but only when the `cJSON_GetErrorPtr` returns a valid pointer. It would be better to return regardless of the `cJSON_GetErrorPtr` return value.
This commit is contained in:
parent
702acc93c6
commit
9aca06e0b7
@ -825,11 +825,10 @@ static BOOL arm_handle_bad_request(rdpArm* arm, const HttpResponse* response, BO
|
||||
{
|
||||
const char* error_ptr = WINPR_JSON_GetErrorPtr();
|
||||
if (error_ptr != NULL)
|
||||
{
|
||||
WLog_ERR(TAG, "NullPoException: %s", error_ptr);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
WINPR_JSON* gateway_code_obj = WINPR_JSON_GetObjectItemCaseSensitive(json, "Code");
|
||||
const char* gw_code_str = WINPR_JSON_GetStringValue(gateway_code_obj);
|
||||
|
Loading…
Reference in New Issue
Block a user