Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed a logic error with my recent gzip patch

The gzip patch I submitted recently assumes that apr_socket_data_get
returns with an error code if there is no data in the socket;
however, this is not always the case. This patch explicitly checks
for the data we want instead of relying on the error code to
indicate its presence.
  • Loading branch information...
commit 05f0453cbe0f6f8e3c3a16c931c7415e76f30b5c 1 parent f6c5db3
@comptonqc comptonqc authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  gmond/gmond.c
View
2  gmond/gmond.c
@@ -264,7 +264,7 @@ socket_send(apr_socket_t *sock, const char *buf, apr_size_t *len)
int z_ret;
ret = apr_socket_data_get((void**)&strm, GZIP_KEY, sock);
- if (ret != APR_SUCCESS)
+ if (ret != APR_SUCCESS || strm == NULL)
{
ret = socket_send_raw( sock, buf, len );
}
Please sign in to comment.
Something went wrong with that request. Please try again.