You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2005/07/11 07:43:52 UTC

cvs commit: ws-axis/c/src/transport/axis3 HTTPTransport.cpp

samisa      2005/07/10 22:43:52

  Modified:    c/src/common ArrayBean.cpp Param.cpp
               c/src/server/apache ApacheTransport.cpp AttachmentHelper.cpp
                        AttachmentHelper.h
               c/src/server/apache2 Apache2Transport.cpp
                        AttachmentHelper.cpp AttachmentHelper.h
                        mod_axis2.cpp
               c/src/soap SoapSerializer.cpp
               c/src/soap/xsd Long.cpp
               c/src/transport/axis3 HTTPTransport.cpp
  Log:
  Fixed compiler warnings on Linux and removed outdated commented blocks.
  AXISCPP-739
  
  Revision  Changes    Path
  1.43      +4 -2      ws-axis/c/src/common/ArrayBean.cpp
  
  Index: ArrayBean.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/common/ArrayBean.cpp,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- ArrayBean.cpp	8 Jul 2005 14:43:40 -0000	1.42
  +++ ArrayBean.cpp	11 Jul 2005 05:43:51 -0000	1.43
  @@ -212,7 +212,8 @@
                   // to add attributes 
   
   				TRACE_SERIALIZE_FUNCT_ENTRY(m_value.cta->pSZFunct, pItem, &pSZ, true);
  -                int stat = m_value.cta->pSZFunct(pItem, &pSZ, true); 
  +                int stat = AXIS_FAIL;
  +                stat = m_value.cta->pSZFunct(pItem, &pSZ, true); 
   				TRACE_SERIALIZE_FUNCT_EXIT(m_value.cta->pSZFunct, stat);
   
                   // no matter true or false is passed
  @@ -237,7 +238,8 @@
               {
                   pItem = ptrval+x*itemsize;
   				TRACE_SERIALIZE_FUNCT_ENTRY(m_value.cta->pSZFunct, pItem, &pSZ, true);
  -                int stat = m_value.cta->pSZFunct(pItem, &pSZ, true); 
  +                int stat = AXIS_FAIL;
  +                stat = m_value.cta->pSZFunct(pItem, &pSZ, true); 
   				TRACE_SERIALIZE_FUNCT_EXIT(m_value.cta->pSZFunct, stat);
               }
           }
  
  
  
  1.59      +4 -6      ws-axis/c/src/common/Param.cpp
  
  Index: Param.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/common/Param.cpp,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- Param.cpp	8 Jul 2005 16:18:15 -0000	1.58
  +++ Param.cpp	11 Jul 2005 05:43:51 -0000	1.59
  @@ -37,10 +37,6 @@
   
   Param::~Param ()
   {
  -    int i;
  -    XML_String pStr = 0;
  -    AnyType* pAny = 0;
  -    
       if (m_AnySimpleType)
       {
           delete m_AnySimpleType;
  @@ -155,7 +151,8 @@
               if (RPC_ENCODED == pSZ.getStyle ())
               {
   				TRACE_SERIALIZE_FUNCT_ENTRY(m_Value.pCplxObj->pSZFunct, m_Value.pCplxObj->pObject, &pSZ, false);
  -                int stat = m_Value.pCplxObj->pSZFunct (m_Value.pCplxObj->pObject, &pSZ, false);
  +                int stat = AXIS_FAIL;
  +                stat = m_Value.pCplxObj->pSZFunct (m_Value.pCplxObj->pObject, &pSZ, false);
   				TRACE_SERIALIZE_FUNCT_EXIT(m_Value.pCplxObj->pSZFunct, stat);
               }
               else
  @@ -165,7 +162,8 @@
                    * to add attributes 
                    */
   				TRACE_SERIALIZE_FUNCT_ENTRY(m_Value.pCplxObj->pSZFunct, m_Value.pCplxObj->pObject, &pSZ, false);
  -                int stat = m_Value.pCplxObj->pSZFunct (m_Value.pCplxObj->pObject, &pSZ, false);
  +                int stat = AXIS_FAIL;
  +                stat = m_Value.pCplxObj->pSZFunct (m_Value.pCplxObj->pObject, &pSZ, false);
   				TRACE_SERIALIZE_FUNCT_EXIT(m_Value.pCplxObj->pSZFunct, stat);
   
   				pSZ.serialize ("</", m_sName.c_str (), ">\n", NULL);
  
  
  
  1.10      +6 -7      ws-axis/c/src/server/apache/ApacheTransport.cpp
  
  Index: ApacheTransport.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/server/apache/ApacheTransport.cpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ApacheTransport.cpp	6 May 2005 08:22:08 -0000	1.9
  +++ ApacheTransport.cpp	11 Jul 2005 05:43:51 -0000	1.10
  @@ -169,8 +169,8 @@
   
       	if (strstr(pBuffer, "Content-Id")) {
   		pAttachmentHelper = new AttachmentHelper();
  -		char *pAttachBuffer = (char*)malloc(1000);
  -		char *mimeBoundary = (char*)malloc(1000);		
  +		//char *pAttachBuffer = (char*)malloc(1000);
  +		//char *mimeBoundary = (char*)malloc(1000);		
   
   		pAttachmentHelper->extract_Attachment(pBuffer);		
   		pAttachmentHelper->extract_SOAPMimeHeaders(pBuffer);	
  @@ -302,7 +302,7 @@
   
   int ApacheTransport::getSubProtocol()
   {
  -    /*Determine the http method and assign it to the axis soap structure */
  +    //Determine the http method and assign it to the axis soap structure 
       switch (((request_rec*)m_pContext)->method_number)
       {
           case M_GET:
  @@ -318,18 +318,17 @@
   {		
   	ISoapAttachment* pAttch = pAttachmentHelper->getAttachment(pcAttachmentid);
   	return pAttch;
  -//	return NULL;
   };
   
   char* ApacheTransport::getIncomingSOAPMimeHeaders()
   {
   	return pAttachmentHelper->getIncomingSOAPMimeHeaders();
  -//	return NULL;
   }
   
   ISoapAttachment**  ApacheTransport::getAllAttachments(int *pAttchArraySize)
   {		
   	ISoapAttachment** pAttachments = pAttachmentHelper->getAllAttachments(pAttchArraySize);
   	return pAttachments;
  -//	return NULL;
  -};
  \ No newline at end of file
  +}
  +
  +
  
  
  
  1.5       +1 -1      ws-axis/c/src/server/apache/AttachmentHelper.cpp
  
  Index: AttachmentHelper.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/server/apache/AttachmentHelper.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AttachmentHelper.cpp	16 Jun 2005 09:31:04 -0000	1.4
  +++ AttachmentHelper.cpp	11 Jul 2005 05:43:51 -0000	1.5
  @@ -52,7 +52,7 @@
   	while (blnContinue)
       {
           SoapAttachment* pSoapAttachment= new SoapAttachment();
  -		int start =0;
  +	unsigned int start = 0;
   
   	if (blnFirstTime) {
   			start = Soap_Message.find("Content-Type", boundary3);
  
  
  
  1.5       +3 -13     ws-axis/c/src/server/apache/AttachmentHelper.h
  
  Index: AttachmentHelper.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/server/apache/AttachmentHelper.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AttachmentHelper.h	16 Jun 2005 09:31:04 -0000	1.4
  +++ AttachmentHelper.h	11 Jul 2005 05:43:51 -0000	1.5
  @@ -29,7 +29,9 @@
   #endif
   #define strtoul strtoul
   
  -#pragma warning( disable : 4786 )
  +#ifdef WIN32
  +#pragma warning( disable : 4786 ) 	// identifier was truncated to 'number' characters 
  +#endif // WIN32
   
   #include <string>
   #include <map>
  @@ -39,18 +41,6 @@
   using namespace std;
   AXIS_CPP_NAMESPACE_USE
   
  -/*
  -struct ltstr
  -{
  -         //bool operator()(const string* s1, const string* s2) const
  -		 bool operator()(const char* s1, const char* s2) const
  -         {
  -          //return strcmp(s1->c_str() , s2->c_str()) < 0;
  -		  return strcmp(s1 , s2) < 0;
  -         }
  -};
  -*/
  -
   class AttachmentHelper  
   {
   private:
  
  
  
  1.11      +2 -2      ws-axis/c/src/server/apache2/Apache2Transport.cpp
  
  Index: Apache2Transport.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/server/apache2/Apache2Transport.cpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Apache2Transport.cpp	5 May 2005 08:56:13 -0000	1.10
  +++ Apache2Transport.cpp	11 Jul 2005 05:43:51 -0000	1.11
  @@ -158,8 +158,8 @@
   	
    	if (strstr(pBuffer, "Content-Id")) {
   		pAttachmentHelper = new AttachmentHelper();
  -		char *pAttachBuffer = (char*)malloc(1000);
  -		char *mimeBoundary = (char*)malloc(1000);		
  +		//char *pAttachBuffer = (char*)malloc(1000);
  +		//char *mimeBoundary = (char*)malloc(1000);		
   
   		pAttachmentHelper->extract_Attachment(pBuffer);		
   		pAttachmentHelper->extract_SOAPMimeHeaders(pBuffer);	
  
  
  
  1.9       +1 -1      ws-axis/c/src/server/apache2/AttachmentHelper.cpp
  
  Index: AttachmentHelper.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/server/apache2/AttachmentHelper.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- AttachmentHelper.cpp	16 Jun 2005 09:31:03 -0000	1.8
  +++ AttachmentHelper.cpp	11 Jul 2005 05:43:51 -0000	1.9
  @@ -52,7 +52,7 @@
   	while (blnContinue)
       {
           SoapAttachment* pSoapAttachment= new SoapAttachment();
  -		int start =0;
  +        unsigned int start = 0;
   
   	if (blnFirstTime) {
   			start = Soap_Message.find("Content-Type", boundary3);
  
  
  
  1.10      +3 -1      ws-axis/c/src/server/apache2/AttachmentHelper.h
  
  Index: AttachmentHelper.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/server/apache2/AttachmentHelper.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- AttachmentHelper.h	16 Jun 2005 09:31:03 -0000	1.9
  +++ AttachmentHelper.h	11 Jul 2005 05:43:51 -0000	1.10
  @@ -29,7 +29,9 @@
   #endif
   #define strtoul strtoul
   
  -#pragma warning( disable : 4786 )
  +#ifdef WIN32
  +#pragma warning( disable : 4786 ) 	// identifier was truncated to 'number' characters 
  +#endif // WIN32
   
   #include <string>
   #include <map>
  
  
  
  1.5       +0 -13     ws-axis/c/src/server/apache2/mod_axis2.cpp
  
  Index: mod_axis2.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/server/apache2/mod_axis2.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_axis2.cpp	23 Nov 2004 04:00:16 -0000	1.4
  +++ mod_axis2.cpp	11 Jul 2005 05:43:51 -0000	1.5
  @@ -75,16 +75,6 @@
       initialize_module(1);
   }
   
  -/* Call initialize_process() [of Packet.h] from within this method */
  -static void axis_Init(server_rec* svr_rec, apr_pool_t* p)
  -{
  -}
  -
  -/*Call finalize_process() [of Packet.h] from within this method*/
  -static void axis_Fini(server_rec* svr_rec, apr_pool_t* p)
  -{
  -}
  -
   static int axis_handler(request_rec* req_rec)
   {
   	return axis_handler_helper(req_rec);
  @@ -93,10 +83,7 @@
   static void mod_axis_register_hooks(apr_pool_t* p)
   {
       ap_hook_child_init(module_init, NULL, NULL, APR_HOOK_REALLY_FIRST);
  -    /* ap_hook_pre_connection(axis_Init, NULL, NULL, APR_HOOK_FIRST); */
       ap_hook_handler(axis_handler, NULL, NULL, APR_HOOK_LAST);
  -    /* ap_hook_process_connection(axis_Fini, NULL, NULL, APR_HOOK_REALLY_LAST);
  -     */
   }
   
   module AP_MODULE_DECLARE_DATA axis_module = {
  
  
  
  1.132     +3 -5      ws-axis/c/src/soap/SoapSerializer.cpp
  
  Index: SoapSerializer.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/SoapSerializer.cpp,v
  retrieving revision 1.131
  retrieving revision 1.132
  diff -u -r1.131 -r1.132
  --- SoapSerializer.cpp	7 Jul 2005 16:29:01 -0000	1.131
  +++ SoapSerializer.cpp	11 Jul 2005 05:43:51 -0000	1.132
  @@ -480,17 +480,15 @@
   {
       if( AXIS_SUCCESS != m_nStatus) 
       {
  -        /* some thing has gone wrong. So do nothing */
  +        // some thing has gone wrong. So do nothing 
           return *this;
       }
   
       try
       {
  -      /* send everything to transport layer, it should handle bufferization itself */
  -      int nStatus = m_pOutputStream->sendBytes( cSerialized, 0);
  +      // send everything to transport layer, it should handle bufferization itself 
  +      m_nStatus = m_pOutputStream->sendBytes( cSerialized, 0);
   
  -      // FIXME: should we process nStatus somehow?
  -	  // Why are we not using m_nStatus?
       }
       catch(AxisSoapException& e)
       {
  
  
  
  1.12      +2 -2      ws-axis/c/src/soap/xsd/Long.cpp
  
  Index: Long.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/xsd/Long.cpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Long.cpp	1 Jun 2005 14:22:56 -0000	1.11
  +++ Long.cpp	11 Jul 2005 05:43:52 -0000	1.12
  @@ -70,13 +70,13 @@
    
       xsd__long * value = new xsd__long;
       *value = static_cast<xsd__long> (*returnValue);
  -    delete returnValue; // Samissa - need to clean this memory
  +    delete returnValue; // Samisa - need to clean this memory
       return value;
   }
   
   MinInclusive* Long::getMinInclusive()
   {    
  -    LONGLONG minInclusive = LONGLONGVALUE(-9223372036854775808);
  +    LONGLONG minInclusive = LONGLONGVALUE(-9223372036854775807);
       return new MinInclusive(minInclusive);
   }
   
  
  
  
  1.36      +1 -1      ws-axis/c/src/transport/axis3/HTTPTransport.cpp
  
  Index: HTTPTransport.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/axis3/HTTPTransport.cpp,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- HTTPTransport.cpp	27 Jun 2005 13:51:53 -0000	1.35
  +++ HTTPTransport.cpp	11 Jul 2005 05:43:52 -0000	1.36
  @@ -458,7 +458,7 @@
   {
       if (0 <= m_iBytesLeft)
       {
  -		int	iIterationCountdown;
  +		int	iIterationCountdown = 100;
   
   		try
   		{