You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by su...@apache.org on 2004/02/11 11:44:25 UTC

cvs commit: ws-axis/c/src/server/apache mod_axis.c

susantha    2004/02/11 02:44:25

  Modified:    c/samples/client/interoptests/cbase InteropTestPortType.c
               c/src/client Call.cpp
               c/src/server/apache mod_axis.c
  Log:
  removed the global buffer from the apache 1.3 axis module becuse it is not thread safe
  
  Revision  Changes    Path
  1.8       +1 -1      ws-axis/c/samples/client/interoptests/cbase/InteropTestPortType.c
  
  Index: InteropTestPortType.c
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/samples/client/interoptests/cbase/InteropTestPortType.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- InteropTestPortType.c	10 Feb 2004 15:04:21 -0000	1.7
  +++ InteropTestPortType.c	11 Feb 2004 10:44:25 -0000	1.8
  @@ -13,7 +13,7 @@
   extern int Axis_GetSize_SOAPStruct();
   
   void* get_InteropTestPortType_stub(){
  -	return GetStubObject(APTHTTP, "http://localhost:5555/axis/InteropBase");
  +	return GetStubObject(APTHTTP, "http://localhost/axis/InteropBase");
   }
   void destroy_InteropTestPortType_stub(void* p){
   	DestroyStubObject(p);
  
  
  
  1.28      +0 -1      ws-axis/c/src/client/Call.cpp
  
  Index: Call.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/client/Call.cpp,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- Call.cpp	10 Feb 2004 12:19:58 -0000	1.27
  +++ Call.cpp	11 Feb 2004 10:44:25 -0000	1.28
  @@ -469,7 +469,6 @@
   extern "C" void DestroyStubObject(void* pCall)
   {
   	Call* pObject = (Call*)((Call_C*)pCall)->_object;
  -	pObject->UnInitialize();
   	delete 	pObject;
   	free(pCall);
   }
  
  
  
  1.21      +17 -7     ws-axis/c/src/server/apache/mod_axis.c
  
  Index: mod_axis.c
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/server/apache/mod_axis.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- mod_axis.c	15 Jan 2004 13:45:23 -0000	1.20
  +++ mod_axis.c	11 Feb 2004 10:44:25 -0000	1.21
  @@ -29,8 +29,6 @@
   
   #define SIZEOFMODULEBUFFER 4096
   
  -char g_buffer[SIZEOFMODULEBUFFER];
  -
   
   /**
    * This method adds the http header to the Ax_soapstream. These headers will be dispatched later
  @@ -123,14 +121,16 @@
   	 /*How can I detect an error when reading stream ? Sanjaya ?
   	 In case of an error set buffer to null, size 0 and return TRANSPORT_FAILED*/
   	int len_read;
  +	char* pBuffer = stream->reserved2;
  +	if (!pBuffer) return TRANSPORT_FAILED;
   	ap_hard_timeout("util_read", (request_rec*)stream->str.ip_stream);
  -	len_read = ap_get_client_block((request_rec*)stream->str.ip_stream, g_buffer, SIZEOFMODULEBUFFER);
  +	len_read = ap_get_client_block((request_rec*)stream->str.ip_stream, pBuffer, SIZEOFMODULEBUFFER);
   	ap_reset_timeout((request_rec*)stream->str.ip_stream);
  -	*req = g_buffer;
  +	*req = pBuffer;
   	*retsize =  len_read;
   	if (len_read < SIZEOFMODULEBUFFER)
   	{
  -		g_buffer[len_read] = '\0';
  +		pBuffer[len_read] = '\0';
   		return TRANSPORT_FINISHED;
   	}
   	else
  @@ -206,16 +206,21 @@
   	/*just add some sessionid*/
   	sstr->sessionid = "this is temporary session id";
   #ifdef CHUNCKED_DATA_SUPPORTED
  +	/* TODO */
   	sstr->reserved1 = NULL;
   	sstr->reserved2 = NULL;
   #else
   	sstr->reserved1 = calloc(NO_OF_SERIALIZE_BUFFERS, sizeof(sendbuffers));
  -	sstr->reserved2 = NULL;
  +	sstr->reserved2 = malloc(SIZEOFMODULEBUFFER);
   #endif
   	req_rec->content_type = "text/xml"; /*for SOAP 1.2 this this should be "application/soap+xml" but keep this for the moment*/
   	/*set up the read policy from the client.*/
   	if ((rc = ap_setup_client_block(req_rec, REQUEST_CHUNKED_ERROR)) != OK)
   	{
  +		if (sstr->reserved1) free(sstr->reserved1);
  +		if (sstr->reserved2) free(sstr->reserved2);
  +		free(sstr->so.http);
  +		free(sstr);
   		return rc;
   	}
   
  @@ -252,7 +257,10 @@
   
   	if(0 != process_request(sstr))
   	{
  -		/*ap_rputs("SOAP Engine failed to response",req_rec);*/
  +		if (sstr->reserved1) free(sstr->reserved1);
  +		if (sstr->reserved2) free(sstr->reserved2);
  +		free(sstr->so.http);
  +		free(sstr);
   		return OK;
   	}
   #ifdef CHUNCKED_DATA_SUPPORTED
  @@ -284,6 +292,8 @@
   	}
   	/*Free the array */
   	if (sstr->reserved1) free(sstr->reserved1);
  +	if (sstr->reserved2) free(sstr->reserved2);
  +
   #endif
   	free(sstr->so.http);
   	free(sstr);