hawq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shivzone <...@git.apache.org>
Subject [GitHub] incubator-hawq pull request: HAWQ-102. Change error message when P...
Date Thu, 12 Nov 2015 18:12:27 GMT
Github user shivzone commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/100#discussion_r44692378
  
    --- Diff: src/backend/access/external/libchurl.c ---
    @@ -815,42 +815,49 @@ void check_response_code(churl_context* context)
     	}
     	else if (response_code != 200 && response_code != 100)
     	{
    -		if (!handle_special_error(response_code))
    -		{
    -			StringInfoData err;
    -			char    *http_error_msg;
    -			char    *addr;
    +		StringInfoData err;
    +		char    *http_error_msg;
    +		char    *addr;
     
    -			initStringInfo(&err);
    +		initStringInfo(&err);
     
    -			/* prepare response text if any */
    -			if (context->download_buffer->ptr)
    -			{
    -				context->download_buffer->ptr[context->download_buffer->top] = '\0';
    -				response_text = context->download_buffer->ptr + context->download_buffer->bot;
    -			}
    +		/* prepare response text if any */
    +		if (context->download_buffer->ptr)
    +		{
    +			context->download_buffer->ptr[context->download_buffer->top] = '\0';
    +			response_text = context->download_buffer->ptr + context->download_buffer->bot;
    +		}
     
    -			/* add remote http error code */
    -			appendStringInfo(&err, "remote component error (%ld)", response_code);
    +		/* add remote http error code */
    +		appendStringInfo(&err, "remote component error (%ld)", response_code);
     
    -			addr = get_dest_address(context->curl_handle);
    -			if (strlen(addr) != 0)
    -				appendStringInfo(&err, " from %s", addr);
    -			pfree(addr);
    +		addr = get_dest_address(context->curl_handle);
    +		if (strlen(addr) != 0)
    +		{
    +			appendStringInfo(&err, " from %s", addr);
    --- End diff --
    
    Sounds good


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message