axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r372788 - /webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c
Date Fri, 27 Jan 2006 08:57:58 GMT
Author: sahan
Date: Fri Jan 27 00:57:44 2006
New Revision: 372788

URL: http://svn.apache.org/viewcvs?rev=372788&view=rev
Log:
Fixed a crash due to NULL soap envelope

Modified:
    webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c

Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c?rev=372788&r1=372787&r2=372788&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c Fri
Jan 27 00:57:44 2006
@@ -216,6 +216,20 @@
 	 */
 	{
 		soap_data_out = AXIS2_MSG_CTX_GET_SOAP_ENVELOPE(msg_ctx, env);
+		if(NULL == soap_data_out)
+		{
+			char error_msg[1024];
+			AXIS2_ERROR_SET((*env)->error, 
+						AXIS2_ERROR_NULL_SOAP_ENVELOPE_IN_MSG_CTX, 
+						AXIS2_FAILURE);
+			sprintf(error_msg, "%s in %s:%d", AXIS2_ERROR_GET_MESSAGE(
+						(*env)->error), __FILE__, __LINE__);
+			AXIS2_LOG(env, error_msg, AXIS2_LOG_CRITICAL);
+			AXIS2_OM_OUTPUT_FREE(om_output, env);
+			om_output = NULL;
+			xml_writer = NULL;
+			return AXIS2_FAILURE;
+		}
 	}
 	if(NULL != epr)
 	{
@@ -273,6 +287,9 @@
             
 		}
 	}
+	AXIS2_OM_OUTPUT_FREE(om_output, env);
+	om_output = NULL;
+	xml_writer = NULL;
 	/*
 	 * TODO handle errors
 	 */	



Mime
View raw message