Author: damitha Date: Sat Jan 26 19:00:13 2008 New Revision: 615550 URL: http://svn.apache.org/viewvc?rev=615550&view=rev Log: Addding a ref counter to soap envelope
Modified: webservices/axis2/trunk/c/axiom/src/soap/soap_envelope.c Modified: webservices/axis2/trunk/c/axiom/src/soap/soap_envelope.c URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/soap/soap_envelope.c?rev=615550&r1=615549&r2=615550&view=diff ============================================================================== --- webservices/axis2/trunk/c/axiom/src/soap/soap_envelope.c (original) +++ webservices/axis2/trunk/c/axiom/src/soap/soap_envelope.c Sat Jan 26 19:00:13 2008 @@ -43,6 +43,7 @@ axiom_soap_body_t *body; /* pointer to soap builder */ axiom_soap_builder_t *soap_builder; + int ref; }; static axis2_status_t check_and_set_soap_version( axiom_soap_envelope_t * soap_envelope, @@ -67,6 +68,7 @@ soap_envelope->soap_version = AXIOM_SOAP12; soap_envelope->header = NULL; soap_envelope->body = NULL; + soap_envelope->ref = 1; soap_envelope->soap_builder = NULL; return soap_envelope; @@ -151,7 +153,10 @@ const axutil_env_t * env) { AXIS2_ENV_CHECK(env, void); - + if (--(soap_envelope->ref) > 0) + { + return; + } if (soap_envelope->header) { axiom_soap_header_free(soap_envelope->header, env); @@ -614,3 +619,13 @@ } return AXIS2_FAILURE; } + +AXIS2_EXTERN axis2_status_t AXIS2_CALL +axiom_soap_envelope_increment_ref( + axiom_soap_envelope_t * envelope, + const axutil_env_t * env) +{ + envelope->ref++; + return AXIS2_SUCCESS; +} + --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]