axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject cvs commit: ws-axis/c/src/wsdd WSDDDeployment.cpp
Date Wed, 28 Apr 2004 12:15:19 GMT
damitha     2004/04/28 05:15:19

  Modified:    c/src/soap Tag: Release1-1-bugfixes-branch
                        SoapKeywordMapping.h SoapKeywordMapping.cpp
                        SoapDeSerializer.cpp SoapSerializer.cpp
                        SoapParserXerces.cpp
               c/src/engine Tag: Release1-1-bugfixes-branch Axis.cpp
                        SharedObject.cpp
               c/src/wsdd Tag: Release1-1-bugfixes-branch
                        WSDDDeployment.cpp
  Log:
  applied memory leaks patch
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.7.2.1   +5 -2      ws-axis/c/src/soap/SoapKeywordMapping.h
  
  Index: SoapKeywordMapping.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/SoapKeywordMapping.h,v
  retrieving revision 1.7
  retrieving revision 1.7.2.1
  diff -u -r1.7 -r1.7.2.1
  --- SoapKeywordMapping.h	8 Apr 2004 10:42:47 -0000	1.7
  +++ SoapKeywordMapping.h	28 Apr 2004 12:15:19 -0000	1.7.2.1
  @@ -17,6 +17,7 @@
   #if !defined(AXIS_SOAPKEYWORDMAPPING_H__INCLUDED_)
   #define AXIS_SOAPKEYWORDMAPPING_H__INCLUDED_
   
  +#include "../common/AxisUtils.h"
   #include <axis/server/SoapEnvVersions.h>
   #include <map>
   
  @@ -43,11 +44,13 @@
       SoapKeywordMapping();
       virtual ~SoapKeywordMapping();
   private:
  -    static map<int, SoapKeywordStruct> m_Map;
  +    //static map<int, SoapKeywordStruct> m_Map;
  +    static SoapKeywordStruct m_Map[VERSION_LAST];
       static volatile bool m_bInit;
   public:
       static void Initialize();
  -    static const SoapKeywordStruct& Map(int nVersion);
  +    static void uninitialize();
  +    static const SoapKeywordStruct& Map(int nVersion);  
   };
   
   #endif
  
  
  
  1.7.2.1   +21 -5     ws-axis/c/src/soap/SoapKeywordMapping.cpp
  
  Index: SoapKeywordMapping.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/SoapKeywordMapping.cpp,v
  retrieving revision 1.7
  retrieving revision 1.7.2.1
  diff -u -r1.7 -r1.7.2.1
  --- SoapKeywordMapping.cpp	8 Apr 2004 09:40:27 -0000	1.7
  +++ SoapKeywordMapping.cpp	28 Apr 2004 12:15:19 -0000	1.7.2.1
  @@ -21,9 +21,10 @@
   
   #include "SoapKeywordMapping.h"
   #include <axis/server/Attribute.h>
  -#include "../common/AxisUtils.h"
  +//#include "../common/AxisUtils.h"
   
  -map<int, SoapKeywordStruct> SoapKeywordMapping::m_Map;
  +//map<int, SoapKeywordStruct> SoapKeywordMapping::m_Map;
  +SoapKeywordStruct SoapKeywordMapping::m_Map[VERSION_LAST];
   volatile bool SoapKeywordMapping::m_bInit = false;
   
   #define __TRC(X) AxisUtils::ToAxisXMLCh(X)
  @@ -35,7 +36,7 @@
   
   SoapKeywordMapping::~SoapKeywordMapping()
   {
  -
  +//    m_Map.clear();
   }
   
   void SoapKeywordMapping::Initialize()
  @@ -44,9 +45,9 @@
       {
           for (int sv = SOAP_VER_1_1; sv < VERSION_LAST; sv++)
           {
  -            m_Map[sv].pchNamespaceUri = 
  +            m_Map[sv].pchNamespaceUri =
                   __TRC(gs_SoapEnvVersionsStruct[sv].pchNamespaceUri);
  -            m_Map[sv].pchPrefix = 
  +            m_Map[sv].pchPrefix =                                                 
                   __TRC(gs_SoapEnvVersionsStruct[sv].pchPrefix);
               for (int sw = SKW_ENVELOPE; sw < SOAP_WORDS_LAST; sw++)
               {
  @@ -69,6 +70,21 @@
           m_Map[SOAP_VER_1_2].pXsd = new Attribute("xsd","xmlns","",
               "http://www.w3.org/2001/XMLSchema");
           m_bInit = true;
  +    }
  +}
  +
  +void SoapKeywordMapping::uninitialize()
  +{
  +    if (m_bInit)
  +    {
  +        /* soap 1.1 envelop attributes */
  +        delete m_Map[SOAP_VER_1_1].pEnv;
  +        delete m_Map[SOAP_VER_1_1].pXsi;
  +        delete m_Map[SOAP_VER_1_1].pXsd;
  +        delete m_Map[SOAP_VER_1_2].pEnv;
  +        delete m_Map[SOAP_VER_1_2].pXsi;
  +        delete m_Map[SOAP_VER_1_2].pXsd;
  +        m_bInit = false;
       }
   }
   
  
  
  
  1.39.2.1  +10 -1     ws-axis/c/src/soap/SoapDeSerializer.cpp
  
  Index: SoapDeSerializer.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/SoapDeSerializer.cpp,v
  retrieving revision 1.39
  retrieving revision 1.39.2.1
  diff -u -r1.39 -r1.39.2.1
  --- SoapDeSerializer.cpp	9 Apr 2004 12:43:39 -0000	1.39
  +++ SoapDeSerializer.cpp	28 Apr 2004 12:15:19 -0000	1.39.2.1
  @@ -69,6 +69,10 @@
   SoapDeSerializer::~SoapDeSerializer()
   {
       m_pParser->Init();
  +    if (m_pEnv) 
  +        delete m_pEnv;
  +    if(m_pHeader)
  +        delete m_pHeader;
       if (m_pParser) delete m_pParser;
   }
   
  @@ -155,6 +159,8 @@
           (0 == strcmp(m_pNode->m_pchNameOrValue, 
           SoapKeywordMapping::Map(m_nSoapVersion).pchWords[SKW_HEADER])))
       {
  +        if(m_pHeader)
  +            delete m_pHeader;
           m_pHeader = new SoapHeader();
           /* Set any attributes/namspaces to the SoapHeader object */
   
  @@ -328,7 +334,10 @@
   {
       if (VERSION_LAST == m_nSoapVersion)
       {
  -        GetEnvelope();
  +	
  +        if (m_pEnv)
  +		delete m_pEnv;
  +        m_pEnv = GetEnvelope();
       }
       return m_nSoapVersion;    
   }
  
  
  
  1.41.2.1  +6 -0      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.41
  retrieving revision 1.41.2.1
  diff -u -r1.41 -r1.41.2.1
  --- SoapSerializer.cpp	8 Apr 2004 12:24:45 -0000	1.41
  +++ SoapSerializer.cpp	28 Apr 2004 12:15:19 -0000	1.41.2.1
  @@ -62,6 +62,12 @@
   SoapSerializer::~SoapSerializer()
   {
       if (m_pSoapEnvelope) delete m_pSoapEnvelope;
  +
  +    for (int x=0; x<m_nMaxBuffersToCreate; x++)
  +    {
  +        delete [] m_pSZBuffers[x].buffer;
  +    }
  +    delete [] m_pSZBuffers;
   }
   
   int SoapSerializer::setSoapEnvelope(SoapEnvelope *pSoapEnvelope)
  
  
  
  1.5.2.1   +7 -0      ws-axis/c/src/soap/SoapParserXerces.cpp
  
  Index: SoapParserXerces.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/SoapParserXerces.cpp,v
  retrieving revision 1.5
  retrieving revision 1.5.2.1
  diff -u -r1.5 -r1.5.2.1
  --- SoapParserXerces.cpp	9 Apr 2004 12:43:39 -0000	1.5
  +++ SoapParserXerces.cpp	28 Apr 2004 12:15:19 -0000	1.5.2.1
  @@ -31,17 +31,24 @@
       m_nStatus = NULL;
       firstParsed = false;
       m_pParser = XMLReaderFactory::createXMLReader();
  +    is = NULL;
   
   }
   
   SoapParserXerces::~SoapParserXerces()
   {
       m_nStatus = NULL;
  +    if(is)
  +        delete is;
  +    delete m_pParser;
   }
   
   int SoapParserXerces::SetInputStream(const Ax_soapstream* pInputStream)
   {
       m_pInputStream = pInputStream;
  +    //check if memeory is already allocated for is
  +    if(is)
  +        delete is;
       is = new SoapInputSource(m_pInputStream->transport.pGetFunct,
           m_pInputStream);
       /* SoapInputSource is(m_pInputStream->transport.pGetFunct, 
  
  
  
  No                   revision
  No                   revision
  1.46.2.1  +4 -1      ws-axis/c/src/engine/Axis.cpp
  
  Index: Axis.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/Axis.cpp,v
  retrieving revision 1.46
  retrieving revision 1.46.2.1
  diff -u -r1.46 -r1.46.2.1
  --- Axis.cpp	8 Apr 2004 12:07:54 -0000	1.46
  +++ Axis.cpp	28 Apr 2004 12:15:19 -0000	1.46.2.1
  @@ -316,8 +316,11 @@
   
   extern "C" int uninitialize_module ()
   {
  -    // XMLPlatformUtils::Terminate();
  +#ifdef USE_XERCES_PARSER
  +    XMLPlatformUtils::Terminate ();
  +#endif
       ModuleUnInitialize ();
  +    SoapKeywordMapping::uninitialize ();
       return AXIS_SUCCESS;
   }
   
  
  
  
  1.8.2.1   +1 -0      ws-axis/c/src/engine/SharedObject.cpp
  
  Index: SharedObject.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/SharedObject.cpp,v
  retrieving revision 1.8
  retrieving revision 1.8.2.1
  diff -u -r1.8 -r1.8.2.1
  --- SharedObject.cpp	9 Apr 2004 05:05:37 -0000	1.8
  +++ SharedObject.cpp	28 Apr 2004 12:15:19 -0000	1.8.2.1
  @@ -36,6 +36,7 @@
   #ifdef WIN32
   #else //Linux
       pthread_mutex_destroy (mut);
  +    delete mut;
   #endif
   }
   
  
  
  
  No                   revision
  No                   revision
  1.32.2.1  +1 -0      ws-axis/c/src/wsdd/WSDDDeployment.cpp
  
  Index: WSDDDeployment.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdd/WSDDDeployment.cpp,v
  retrieving revision 1.32
  retrieving revision 1.32.2.1
  diff -u -r1.32 -r1.32.2.1
  --- WSDDDeployment.cpp	8 Apr 2004 13:30:08 -0000	1.32
  +++ WSDDDeployment.cpp	28 Apr 2004 12:15:19 -0000	1.32.2.1
  @@ -84,6 +84,7 @@
               delete ((*iter2).second);
           }
       }
  +    delete m_pLibNameIdMap;
   }
   
   const WSDDHandlerList* WSDDDeployment::GetGlobalRequestFlowHandlers()
  
  
  

Mime
View raw message