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 sa...@apache.org on 2004/12/23 10:32:10 UTC
cvs commit: ws-axis/c/src/soap URIMapping.cpp URIMapping.h
samisa 2004/12/23 01:32:10
Modified: c/src/engine Axis.cpp
c/src/soap URIMapping.cpp URIMapping.h
Log:
Minor fixes to get rid of "Potential leak" messages by purify tools.
Also replaced the macro and defined types with direct types to make code more readable.
CVS: ----------------------------------------------------------------------
CVS: PR:
CVS: If this change addresses a PR in the problem report tracking
CVS: database, then enter the PR number(s) here.
CVS: Obtained from:
CVS: If this change has been taken from another system, such as NCSA,
CVS: then name the system in this line, otherwise delete it.
CVS: Submitted by:
CVS: If this code has been contributed to Apache by someone else; i.e.,
CVS: they sent us a patch or a new module, then include their name/email
CVS: address here. If this is your work then delete this line.
CVS: Reviewed by:
CVS: If we are doing pre-commit code reviews and someone else has
CVS: reviewed your changes, include their name(s) here.
CVS: If you have not had it reviewed then delete this line.
Revision Changes Path
1.87 +3 -2 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.86
retrieving revision 1.87
diff -u -r1.86 -r1.87
--- Axis.cpp 23 Dec 2004 09:14:26 -0000 1.86
+++ Axis.cpp 23 Dec 2004 09:32:10 -0000 1.87
@@ -396,9 +396,10 @@
{
g_bModuleInitialize = false;
TypeMapping::uninitialize();
+ URIMapping::uninitialize();
SOAPTransportFactory::uninitialize();
- ModuleUnInitialize ();
- SoapKeywordMapping::uninitialize ();
+ ModuleUnInitialize();
+ SoapKeywordMapping::uninitialize();
XMLParserFactory::uninitialize();
return AXIS_SUCCESS;
}
1.15 +17 -9 ws-axis/c/src/soap/URIMapping.cpp
Index: URIMapping.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/URIMapping.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- URIMapping.cpp 8 Oct 2004 09:01:09 -0000 1.14
+++ URIMapping.cpp 23 Dec 2004 09:32:10 -0000 1.15
@@ -44,28 +44,36 @@
{
if (!m_bInit)
{
- m_sURIMap[__TRC("http://www.w3.org/2001/XMLSchema")] = URI_XSD;
- m_sURIMap[__TRC("http://www.w3.org/2001/XMLSchema-instance")] =
+ m_sURIMap[std::string("http://www.w3.org/2001/XMLSchema")] = URI_XSD;
+ m_sURIMap[std::string("http://www.w3.org/2001/XMLSchema-instance")] =
URI_XSI;
- m_sURIMap[__TRC("http://www.w3.org/2001/06/soap-encoding")] = URI_ENC;
- m_sURIMap[__TRC("http://schemas.xmlsoap.org/soap/encoding/")] = URI_ENC;
- m_sURIMap[__TRC("http://schemas.xmlsoap.org/soap/envelope/")] =
+ m_sURIMap[std::string("http://www.w3.org/2001/06/soap-encoding")] = URI_ENC;
+ m_sURIMap[std::string("http://schemas.xmlsoap.org/soap/encoding/")] = URI_ENC;
+ m_sURIMap[std::string("http://schemas.xmlsoap.org/soap/envelope/")] =
URI_ENVELOPE;
- m_sURIMap[__TRC("http://www.w3.org/1999/XMLSchema")] = URI_XSD;
- m_sURIMap[__TRC("http://www.w3.org/1999/XMLSchema-instance")] =
+ m_sURIMap[std::string("http://www.w3.org/1999/XMLSchema")] = URI_XSD;
+ m_sURIMap[std::string("http://www.w3.org/1999/XMLSchema-instance")] =
URI_XSI;
m_bInit = true;
}
}
+void URIMapping::uninitialize()
+{
+ if (m_bInit)
+ {
+ m_sURIMap.clear();
+ m_bInit = false;
+ }
+}
URITYPE URIMapping::getURI(const AxisXMLCh* uri)
{
- if (m_sURIMap.find(uri) != m_sURIMap.end())
+ if (m_sURIMap.find(std::string(uri)) != m_sURIMap.end())
{
- return m_sURIMap[uri];
+ return m_sURIMap[std::string(uri)];
}
return URI_UNKNOWN;
}
1.17 +3 -1 ws-axis/c/src/soap/URIMapping.h
Index: URIMapping.h
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/URIMapping.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- URIMapping.h 23 Nov 2004 17:21:05 -0000 1.16
+++ URIMapping.h 23 Dec 2004 09:32:10 -0000 1.17
@@ -41,7 +41,9 @@
{
public:
static void initialize();
- static map<AxisXMLString, URITYPE> m_sURIMap;
+ static void uninitialize();
+ //static map<AxisXMLString, URITYPE> m_sURIMap;
+ static map<std::string, URITYPE> m_sURIMap;
static volatile bool m_bInit;
URIMapping();
virtual ~URIMapping();