axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jared Hanson" <>
Subject [axis2c] please review attached patch for (AXIS2C-536)
Date Sat, 24 Feb 2007 01:03:43 GMT
I've attached a patch for soap_over_http_sender, which attempts to resolve
the issue with the leaking of socket handles used by http_client.

The flow goes like this:

1. axis2_http_transport_sender_write_message: creates a
2. a call to soap_over_http_sender_send is called in order to transmit a
soap request
3. within soap_over_http_sender_send, an http_client (and sockfd) is created
4. control returns to axis2_http_transport_sender_write_message
5. a call to AXIS2_SOAP_OVER_HTTP_SENDER_FREE is made, but currently the
http_client is not freed
 --- this is necessary because the stream (used to receive the response)
needs the socket handle etc,
6. a call to axis2_http_transport_utils_create_soap_msg() is used to receive
and construct the soap response

The problem is, that the http_client instance is lost.  So, my patch adds a
get_client() method to the soap_over_http_sender.
- within axis2_http_transport_sender_write_message(), the http_client
pointer is obtained, before calling AXIS2_SOAP_OVER_HTTP_SENDER_FREE
- as normal, the function then proceeds to read the response using
- after that is done we no longer need to stream or sockfd, so the
http_client instance is free'd

The valgrind output with this patch didn't show any new issues.  Also note,
that rest_sender may need a similar fix, but I did not investigate that.
Please review this patch.


View raw message