[mapguide-commits] r5183 - in trunk/MgDev: Common/Foundation/System Common/Geometry Common/MapGuideCommon/System Server/src/Common/Base Server/src/Common/Manager Server/src/Core Server/src/Services/Feature Server/src/Services/Kml Server/src/Services/Mapping Server/src/Services/Rendering Server/src/Services/Resource Server/src/Services/ServerAdmin Server/src/Services/Site Server/src/Services/Tile Server/src/UnitTesting Web/src/HttpHandler

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Sep 23 15:54:29 EDT 2010


Author: trevorwekel
Date: 2010-09-23 19:54:29 +0000 (Thu, 23 Sep 2010)
New Revision: 5183

Modified:
   trunk/MgDev/Common/Foundation/System/ArgumentPacket.h
   trunk/MgDev/Common/Foundation/System/BasicPacket.h
   trunk/MgDev/Common/Foundation/System/BinaryStreamArgumentPacket.h
   trunk/MgDev/Common/Foundation/System/CollectionPacket.h
   trunk/MgDev/Common/Foundation/System/ControlPacket.h
   trunk/MgDev/Common/Foundation/System/Disposable.h
   trunk/MgDev/Common/Foundation/System/GuardDisposable.cpp
   trunk/MgDev/Common/Foundation/System/GuardDisposable.h
   trunk/MgDev/Common/Foundation/System/OperationResponsePacket.h
   trunk/MgDev/Common/Geometry/Makefile.am
   trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.cpp
   trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.h
   trunk/MgDev/Common/MapGuideCommon/System/UserInformation.cpp
   trunk/MgDev/Server/src/Common/Base/ClientHandler.cpp
   trunk/MgDev/Server/src/Common/Base/ServiceOperation.cpp
   trunk/MgDev/Server/src/Common/Manager/Connection.h
   trunk/MgDev/Server/src/Common/Manager/FdoConnectionManager.cpp
   trunk/MgDev/Server/src/Common/Manager/LogManager.cpp
   trunk/MgDev/Server/src/Common/Manager/LogManager.h
   trunk/MgDev/Server/src/Common/Manager/LongTransactionManager.cpp
   trunk/MgDev/Server/src/Common/Manager/PackageLogHandler.h
   trunk/MgDev/Server/src/Common/Manager/PermissionInfo.h
   trunk/MgDev/Server/src/Common/Manager/ServerManager.cpp
   trunk/MgDev/Server/src/Common/Manager/ServerManager.h
   trunk/MgDev/Server/src/Common/Manager/ServiceManager.cpp
   trunk/MgDev/Server/src/Common/Manager/SessionInfo.h
   trunk/MgDev/Server/src/Common/Manager/UserInfo.cpp
   trunk/MgDev/Server/src/Common/Manager/UserInfo.h
   trunk/MgDev/Server/src/Core/Server.cpp
   trunk/MgDev/Server/src/Core/main.cpp
   trunk/MgDev/Server/src/Services/Feature/ServerFeatureService.cpp
   trunk/MgDev/Server/src/Services/Feature/ServerGetProviderCapabilities.cpp
   trunk/MgDev/Server/src/Services/Kml/ServerKmlService.cpp
   trunk/MgDev/Server/src/Services/Mapping/ServerMappingService.cpp
   trunk/MgDev/Server/src/Services/Rendering/ServerRenderingService.cpp
   trunk/MgDev/Server/src/Services/Resource/ApplicationRepository.h
   trunk/MgDev/Server/src/Services/Resource/ApplicationRepositoryManager.cpp
   trunk/MgDev/Server/src/Services/Resource/DataBindingInfo.h
   trunk/MgDev/Server/src/Services/Resource/OperationInfo.h
   trunk/MgDev/Server/src/Services/Resource/OperationParameter.h
   trunk/MgDev/Server/src/Services/Resource/ResourcePackageManifestHandler.h
   trunk/MgDev/Server/src/Services/Resource/SiteRepositoryManager.cpp
   trunk/MgDev/Server/src/Services/ServerAdmin/OpNotifyResourcesChanged.cpp
   trunk/MgDev/Server/src/Services/ServerAdmin/OpRegisterServicesOnServers.cpp
   trunk/MgDev/Server/src/Services/ServerAdmin/OpUnregisterServicesOnServers.cpp
   trunk/MgDev/Server/src/Services/Site/ServerSiteService.cpp
   trunk/MgDev/Server/src/Services/Tile/ServerTileService.cpp
   trunk/MgDev/Server/src/UnitTesting/TestKmlService.cpp
   trunk/MgDev/Web/src/HttpHandler/HttpWmsGetCapabilities.cpp
   trunk/MgDev/Web/src/HttpHandler/WmsMapUtil.cpp
Log:
Ticket #1423 Linux std::string not thread safe
- Submit Common, Server, Web, to trunk


Modified: trunk/MgDev/Common/Foundation/System/ArgumentPacket.h
===================================================================
--- trunk/MgDev/Common/Foundation/System/ArgumentPacket.h	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Common/Foundation/System/ArgumentPacket.h	2010-09-23 19:54:29 UTC (rev 5183)
@@ -25,9 +25,19 @@
 //  Argument Packet Wrapper Structure
 struct MgArgumentPacket : public MgBasicPacket
 {
-    MgArgumentPacket() : m_pData( NULL )      { };
+    MgArgumentPacket()
+    :
+    m_ArgumentType(0),
+    m_pData(NULL),
+    m_Length(0)
+    {
+    }
 
-    virtual ~MgArgumentPacket()               { delete[] m_pData; };
+    virtual ~MgArgumentPacket()
+    {
+        delete[] m_pData;
+        m_pData = NULL;
+    }
 
     UINT32      m_ArgumentType;
     UINT8*      m_pData;

Modified: trunk/MgDev/Common/Foundation/System/BasicPacket.h
===================================================================
--- trunk/MgDev/Common/Foundation/System/BasicPacket.h	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Common/Foundation/System/BasicPacket.h	2010-09-23 19:54:29 UTC (rev 5183)
@@ -22,6 +22,12 @@
 //  Basic Packet Wrapper Structure
 struct MgBasicPacket
 {
+    MgBasicPacket()
+    :
+     m_PacketHeader(0)
+    {
+    }
+
     UINT32 m_PacketHeader;
 };
 /// \endcond

Modified: trunk/MgDev/Common/Foundation/System/BinaryStreamArgumentPacket.h
===================================================================
--- trunk/MgDev/Common/Foundation/System/BinaryStreamArgumentPacket.h	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Common/Foundation/System/BinaryStreamArgumentPacket.h	2010-09-23 19:54:29 UTC (rev 5183)
@@ -25,6 +25,12 @@
 //  Binary Stream Argument Packet Wrapper Structure
 struct MgBinaryStreamArgumentPacket : public MgArgumentPacket
 {
+    MgBinaryStreamArgumentPacket()
+    :
+    m_Version(0)
+    {
+    }
+
     UINT32      m_Version;
 };
 /// \endcond

Modified: trunk/MgDev/Common/Foundation/System/CollectionPacket.h
===================================================================
--- trunk/MgDev/Common/Foundation/System/CollectionPacket.h	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Common/Foundation/System/CollectionPacket.h	2010-09-23 19:54:29 UTC (rev 5183)
@@ -25,6 +25,12 @@
 //  Collection Packet Wrapper Structure
 struct MgCollectionPacket : public MgArgumentPacket
 {
+    MgCollectionPacket()
+    :
+     m_NumElements(0)
+    {
+    }
+
     UINT32  m_NumElements;
 };
 /// \endcond

Modified: trunk/MgDev/Common/Foundation/System/ControlPacket.h
===================================================================
--- trunk/MgDev/Common/Foundation/System/ControlPacket.h	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Common/Foundation/System/ControlPacket.h	2010-09-23 19:54:29 UTC (rev 5183)
@@ -24,6 +24,13 @@
 //  Control Packet Wrapper Structure
 struct MgControlPacket : public MgBasicPacket
 {
+    MgControlPacket()
+    :
+    m_PacketVersion(0),
+    m_ControlID(0)
+    {
+    }
+
     UINT32 m_PacketVersion;
     UINT32 m_ControlID;
 };

Modified: trunk/MgDev/Common/Foundation/System/Disposable.h
===================================================================
--- trunk/MgDev/Common/Foundation/System/Disposable.h	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Common/Foundation/System/Disposable.h	2010-09-23 19:54:29 UTC (rev 5183)
@@ -79,7 +79,7 @@
     /// \return
     /// Returns nothing
     ///
-    void SetRefCountFlag();
+    virtual void SetRefCountFlag();
 
 protected:
 

Modified: trunk/MgDev/Common/Foundation/System/GuardDisposable.cpp
===================================================================
--- trunk/MgDev/Common/Foundation/System/GuardDisposable.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Common/Foundation/System/GuardDisposable.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -79,6 +79,13 @@
 
 
 //////////////////////////////////////////////////////////////
+void MgGuardDisposable::SetRefCountFlag()
+{
+   ACE_MT(ACE_GUARD(ACE_Recursive_Thread_Mutex, ace_mon, m_mutex));
+   m_refCountFlag = true;
+}
+
+//////////////////////////////////////////////////////////////
 MgGuardDisposable::MgGuardDisposable()
 {
 }

Modified: trunk/MgDev/Common/Foundation/System/GuardDisposable.h
===================================================================
--- trunk/MgDev/Common/Foundation/System/GuardDisposable.h	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Common/Foundation/System/GuardDisposable.h	2010-09-23 19:54:29 UTC (rev 5183)
@@ -67,6 +67,15 @@
     ///
     virtual INT32 Release();
 
+    //////////////////////////////////////////////////////////////////
+    /// \brief
+    /// Sets the refcount flag for this object to true
+    ///
+    /// \return
+    /// Returns nothing
+    ///
+    void SetRefCountFlag();
+
 protected:
 
     //////////////////////////////////////////////////////////////////

Modified: trunk/MgDev/Common/Foundation/System/OperationResponsePacket.h
===================================================================
--- trunk/MgDev/Common/Foundation/System/OperationResponsePacket.h	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Common/Foundation/System/OperationResponsePacket.h	2010-09-23 19:54:29 UTC (rev 5183)
@@ -24,6 +24,14 @@
 //  Operation Response Packet Wrapper Structure
 struct MgOperationResponsePacket : public MgBasicPacket
 {
+    MgOperationResponsePacket()
+    : 
+    m_PacketVersion(0),
+    m_ECode(0),
+    m_NumReturnValues(0)
+    {
+    }
+
     UINT32 m_PacketVersion;
     UINT32 m_ECode;
     UINT32 m_NumReturnValues;

Modified: trunk/MgDev/Common/Geometry/Makefile.am
===================================================================
--- trunk/MgDev/Common/Geometry/Makefile.am	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Common/Geometry/Makefile.am	2010-09-23 19:54:29 UTC (rev 5183)
@@ -50,7 +50,8 @@
   ../CoordinateSystem/CoordSysMgrsZone.cpp \
   ../CoordinateSystem/CoordSysMgrs.cpp \
   ../CoordinateSystem/CoordSysMgrsMajorRegion.cpp \
-  ../CoordinateSystem/CoordSysOneGrid.cpp
+  ../CoordinateSystem/CoordSysOneGrid.cpp \
+  ../CoordinateSystem/namestruct.cpp
 
 include_SOURCES = \
   AgfReaderWriter.cpp \

Modified: trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -134,6 +134,8 @@
 const STRING MgConfigProperties::DefaultGeneralPropertyFdoPath                              = L"";
 const STRING MgConfigProperties::GeneralPropertyLicenseServerPath                           = L"LicenseServerPath";
 const STRING MgConfigProperties::DefaultGeneralPropertyLicenseServerPath                    = L"";
+const STRING MgConfigProperties::GeneralPropertyLinuxMemDebug                               = L"LinuxMemDebug";
+const bool   MgConfigProperties::DefaultGeneralPropertyLinuxMemDebug                        = false;
 const STRING MgConfigProperties::GeneralPropertyLogsDelimiter                               = L"LogsDelimiter";
 const STRING MgConfigProperties::DefaultGeneralPropertyLogsDelimiter                        = L"\t";
 const STRING MgConfigProperties::GeneralPropertyLogsDetail                                  = L"LogsDetail";
@@ -523,6 +525,7 @@
     { MgConfigProperties::GeneralPropertyDisplayName                                , MgPropertyType::String    , MG_CONFIG_MIN_OPTIONAL_STRING_LENGTH  , MG_CONFIG_MAX_OPTIONAL_STRING_LENGTH  , MG_CONFIG_FILE_NAME_RESERVED_CHARACTERS   },
     { MgConfigProperties::GeneralPropertyFdoPath                                    , MgPropertyType::String    , MG_CONFIG_MIN_PATH_LENGTH             , MG_CONFIG_MAX_PATH_LENGTH             , MG_CONFIG_PATH_RESERVED_CHARACTERS        },
     { MgConfigProperties::GeneralPropertyLicenseServerPath                          , MgPropertyType::String    , MG_CONFIG_MIN_OPTIONAL_STRING_LENGTH  , MG_CONFIG_MAX_OPTIONAL_STRING_LENGTH  , L""                                       },
+    { MgConfigProperties::GeneralPropertyLinuxMemDebug                              , MgPropertyType::Boolean   , 0                                     , 1                                     , L""                                       },
     { MgConfigProperties::GeneralPropertyLogsDelimiter                              , MgPropertyType::String    , 1                                     , 128                                   , L""                                       },
     { MgConfigProperties::GeneralPropertyLogsDetail                                 , MgPropertyType::String    , MG_CONFIG_MIN_OPTIONAL_STRING_LENGTH  , MG_CONFIG_MAX_OPTIONAL_STRING_LENGTH  , L""                                       },
     { MgConfigProperties::GeneralPropertyLogsPath                                   , MgPropertyType::String    , MG_CONFIG_MIN_PATH_LENGTH             , MG_CONFIG_MAX_PATH_LENGTH             , MG_CONFIG_PATH_RESERVED_CHARACTERS        },

Modified: trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.h
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.h	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.h	2010-09-23 19:54:29 UTC (rev 5183)
@@ -74,6 +74,10 @@
     static const STRING GeneralPropertyLicenseServerPath;               /// value("LicenseServerPath")
     static const STRING DefaultGeneralPropertyLicenseServerPath;        /// value("");
 
+    /// Memory allocator debugging for Linux
+    static const STRING GeneralPropertyLinuxMemDebug;               /// value("LinuxMemDebug")
+    static const bool DefaultGeneralPropertyLinuxMemDebug;        /// value(false);
+
     /// Sets the field delimiter in the logs
     static const STRING GeneralPropertyLogsDelimiter;                   /// value("LogsDelimiter")
     static const STRING DefaultGeneralPropertyLogsDelimiter;            /// value("\t")

Modified: trunk/MgDev/Common/MapGuideCommon/System/UserInformation.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/System/UserInformation.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Common/MapGuideCommon/System/UserInformation.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -47,7 +47,7 @@
 ///</summary>
 MgUserInformation::MgUserInformation(CREFSTRING sessionId)
 {
-    SetMgSessionId(sessionId);
+    SetMgSessionId(sessionId.c_str());
     m_type = uitMgSession;
     m_apiVersion = MG_API_VERSION(1,0,0);
 }
@@ -69,8 +69,8 @@
 {
     MgUtil::CheckXss(userName);
 
-    m_username = userName;
-    m_password = password;
+    m_username = userName.c_str();
+    m_password = password.c_str();
     m_type = uitMg;
     m_apiVersion = MG_API_VERSION(1,0,0);
 }
@@ -103,13 +103,13 @@
 {
     if (&userInfo != this)
     {
-        m_username = userInfo.m_username;
-        m_password = userInfo.m_password;
-        m_sessionId = userInfo.m_sessionId;
-        m_locale = userInfo.m_locale;
+        m_username = userInfo.m_username.c_str();
+        m_password = userInfo.m_password.c_str();
+        m_sessionId = userInfo.m_sessionId.c_str();
+        m_locale = userInfo.m_locale.c_str();
         m_type = userInfo.m_type;
-        m_clientAgent = userInfo.m_clientAgent;
-        m_clientIp = userInfo.m_clientIp;
+        m_clientAgent = userInfo.m_clientAgent.c_str();
+        m_clientIp = userInfo.m_clientIp.c_str();
         m_apiVersion = userInfo.m_apiVersion;
     }
 
@@ -134,8 +134,8 @@
 {
     MgUtil::CheckXss(userName);
 
-    m_username = userName;
-    m_password = password;
+    m_username = userName.c_str();
+    m_password = password.c_str();
     m_type = uitMg;
 }
 
@@ -156,7 +156,7 @@
 ///<returns>
 /// Username stored
 ///</returns>
-STRING MgUserInformation::GetUserName() { return m_username; }
+STRING MgUserInformation::GetUserName() { return (STRING)m_username.c_str(); }
 
 ///////////////////////////////
 ///<summary>
@@ -165,7 +165,7 @@
 ///<returns>
 /// password stored
 ///</returns>
-STRING MgUserInformation::GetPassword() { return m_password; }
+STRING MgUserInformation::GetPassword() { return (STRING)m_password.c_str(); }
 
 ///////////////////////////////
 ///<summary>
@@ -173,7 +173,7 @@
 ///</summary>
 STRING MgUserInformation::GetMgSessionId()
 {
-    return m_sessionId;
+    return (STRING)m_sessionId.c_str();
 }
 
 ///////////////////////////////
@@ -200,7 +200,7 @@
         {
             SetLocale(sessionId.substr(sepChar+1, MG_LOCALE_LENGTH));
         }
-        m_sessionId = sessionId;
+        m_sessionId = sessionId.c_str();
     }
     else
     {
@@ -245,7 +245,7 @@
     else
     {
         // two-character locales remain case insensitive for legacy behavior
-        m_locale = locale;
+        m_locale = locale.c_str();
     }
 }
 
@@ -256,17 +256,17 @@
 ///</summary>
 STRING MgUserInformation::GetLocale()
 {
-    return m_locale;
+    return (STRING)m_locale.c_str();
 }
 
 void MgUserInformation::SetClientAgent(CREFSTRING agent)
 {
-    m_clientAgent = agent;
+    m_clientAgent = agent.c_str();
 }
 
 STRING MgUserInformation::GetClientAgent()
 {
-    return m_clientAgent;
+    return (STRING)m_clientAgent.c_str();
 }
 
 void MgUserInformation::SetClientIp(CREFSTRING ip)
@@ -275,12 +275,12 @@
     // Note that MgIpUtil::ValidateAddress is not used here because
     // an IP look up will affect peformance.
     MgUtil::CheckXss(ip);
-    m_clientIp = ip;
+    m_clientIp = ip.c_str();
 }
 
 STRING MgUserInformation::GetClientIp()
 {
-    return m_clientIp;
+    return (STRING)m_clientIp.c_str();
 }
 
 ///////////////////////////////
@@ -407,6 +407,8 @@
         throw new MgConnectionNotOpenException(L"MgSiteConnection.GetCurrentUserInfo", __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
+    SAFE_ADDREF(userInfo);
+
     return userInfo;
 }
 
@@ -481,8 +483,8 @@
         MgCryptographyUtil cryptoUtil;
         string username, password;
 
-        cryptoUtil.DecryptCredentials(MgUtil::WideCharToMultiByte(credentials),
-            username, password);
+        string cred = MgUtil::WideCharToMultiByte(credentials);
+        cryptoUtil.DecryptCredentials(cred, username, password);
 
         MgUtil::MultiByteToWideChar(username, m_username);
         MgUtil::MultiByteToWideChar(password, m_password);

Modified: trunk/MgDev/Server/src/Common/Base/ClientHandler.cpp
===================================================================
--- trunk/MgDev/Server/src/Common/Base/ClientHandler.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Common/Base/ClientHandler.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -213,8 +213,13 @@
 
     //  create a MgStreamData Object for our message queue
     MgStreamData* pData = NULL;
-    ACE_NEW_RETURN( pData, MgServerStreamData( this, handle, m_pStreamHelper ), -1 );
+    ACE_Allocator* allocator = ACE_Allocator::instance();
+    ACE_NEW_MALLOC_RETURN( pData,
+        static_cast<MgServerStreamData*>(allocator->malloc(sizeof(MgServerStreamData))),
+        MgServerStreamData( this, handle, m_pStreamHelper ), -1 );
 
+    //ACE_NEW_RETURN( pData, MgServerStreamData( this, handle, m_pStreamHelper ), -1 );
+
     //  create the message block
     ACE_Message_Block* mb = NULL;
     ACE_NEW_RETURN( mb, ACE_Message_Block( pData ), -1 );
@@ -282,6 +287,7 @@
 /// </summary>
 void MgClientHandler::SetStatus( MgClientHandler::HandlerStatus status )
 {
+    ACE_MT(ACE_GUARD(ACE_Recursive_Thread_Mutex, ace_mon, m_mutex));
     m_Status = status;
 };
 

Modified: trunk/MgDev/Server/src/Common/Base/ServiceOperation.cpp
===================================================================
--- trunk/MgDev/Server/src/Common/Base/ServiceOperation.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Common/Base/ServiceOperation.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -219,7 +219,7 @@
     {
         // Log the exception using Server locale or User locale if it exists
         STRING locale = MgResources::DefaultMessageLocale;
-        MgUserInformation* currUserInfo = MgUserInformation::GetCurrentUserInfo();
+        Ptr<MgUserInformation> currUserInfo = MgUserInformation::GetCurrentUserInfo();
         if (NULL != currUserInfo)
         {
             locale = currUserInfo->GetLocale();
@@ -644,7 +644,7 @@
 
     if (serverManager->IsSiteServer())
     {
-        MgUserInformation* currUserInfo = MgUserInformation::GetCurrentUserInfo();
+        Ptr<MgUserInformation> currUserInfo = MgUserInformation::GetCurrentUserInfo();
         assert(NULL != currUserInfo);
         Ptr<MgStringCollection> requiredRoles = GetRoles();
 

Modified: trunk/MgDev/Server/src/Common/Manager/Connection.h
===================================================================
--- trunk/MgDev/Server/src/Common/Manager/Connection.h	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Common/Manager/Connection.h	2010-09-23 19:54:29 UTC (rev 5183)
@@ -85,10 +85,10 @@
     void SetCurrentOperationStatus(OperationStatus opStatus);
     void SetCurrentOperationTime(INT32 opTime);
 
-    CREFSTRING GetClientAgent() const;
-    CREFSTRING GetClientIp() const;
-    CREFSTRING GetUserName() const;
-    CREFSTRING GetSessionId() const;
+    STRING GetClientAgent() const;
+    STRING GetClientIp() const;
+    STRING GetUserName() const;
+    STRING GetSessionId() const;
     const ACE_Time_Value& GetLastUsageTime() const;
     const ACE_Time_Value& GetStartTime() const;
     INT32 GetProcessedOperations() const;
@@ -127,22 +127,22 @@
 
 /// Inline Methods
 
-inline CREFSTRING MgConnection::GetClientAgent() const
+inline STRING MgConnection::GetClientAgent() const
 {
     return m_clientAgent;
 }
 
-inline CREFSTRING MgConnection::GetClientIp() const
+inline STRING MgConnection::GetClientIp() const
 {
     return m_clientIp;
 }
 
-inline CREFSTRING MgConnection::GetUserName() const
+inline STRING MgConnection::GetUserName() const
 {
     return m_userName;
 }
 
-inline CREFSTRING MgConnection::GetSessionId() const
+inline STRING MgConnection::GetSessionId() const
 {
     return m_sessionId;
 }

Modified: trunk/MgDev/Server/src/Common/Manager/FdoConnectionManager.cpp
===================================================================
--- trunk/MgDev/Server/src/Common/Manager/FdoConnectionManager.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Common/Manager/FdoConnectionManager.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -2006,7 +2006,7 @@
 ///
 void MgFdoConnectionManager::SubstituteConnectionTags(REFSTRING connectionStr)
 {
-    MgUserInformation* userInfo =  MgUserInformation::GetCurrentUserInfo();
+    Ptr<MgUserInformation> userInfo =  MgUserInformation::GetCurrentUserInfo();
 
     if (NULL != userInfo)
     {

Modified: trunk/MgDev/Server/src/Common/Manager/LogManager.cpp
===================================================================
--- trunk/MgDev/Server/src/Common/Manager/LogManager.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Common/Manager/LogManager.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -319,7 +319,7 @@
     MG_LOGMANAGER_CATCH_AND_THROW(L"MgLogManager.LoadConfigurationProperties")
 }
 
-CREFSTRING MgLogManager::GetLogsPath()
+STRING MgLogManager::GetLogsPath()
 {
     return m_path;
 }
@@ -2381,9 +2381,14 @@
     MG_LOGMANAGER_TRY()
 
     // We want the log thread to handle the log entry for us
-    MgLogEntryData* led;
-    ACE_NEW_NORETURN( led, MgLogEntryData(logType, message, logPriority) );
+    MgLogEntryData* led = NULL;
+    ACE_Allocator* allocator = ACE_Allocator::instance();
+    ACE_NEW_MALLOC_NORETURN (led,
+        static_cast<MgLogEntryData*> (allocator->malloc(sizeof(MgLogEntryData))),
+        MgLogEntryData(logType, message, logPriority) );
 
+    //ACE_NEW_NORETURN( led, MgLogEntryData(logType, message, logPriority) );
+
     ACE_Message_Block* mb;
     ACE_NEW_NORETURN( mb, ACE_Message_Block( led ) );
     if(mb)
@@ -2442,11 +2447,14 @@
 
         MG_LOGMANAGER_TRY()
 
-        LogToSysLog(pAce, (char *)(MgUtil::WideCharToMultiByte(m_applicationName)).c_str());
+        string appName = MgUtil::WideCharToMultiByte(m_applicationName);
+        wchar_t* messageStr = (wchar_t*) message.c_str();
+
+        LogToSysLog(pAce, (char *)appName.c_str());
 #ifdef _WIN32
         pAce->log(logPriority, ACE_TEXT("%Z\r\n"), message.c_str()); // WAS %W
 #else
-        pAce->log(logPriority, ACE_TEXT("%Z\n"), message.c_str()); // WAS %W
+        pAce->log(logPriority, ACE_TEXT("%Z\n"), messageStr); // WAS %W
 #endif
         LogToStderr(pAce);
 
@@ -2735,23 +2743,11 @@
     if (pReadFile != NULL)
     {
         const int size = 2048;
-        char* buffer = new char[size];
-        if (buffer == NULL)
-        {
-            ACE_OS::fclose(pReadFile);
-            throw new MgOutOfMemoryException(L"MgLogManager.GetLogHeader", __LINE__, __WFILE__, NULL, L"", NULL);
-        }
+        char buffer[2048] = {0};
 
-        // Clear buffer
-        memset(buffer, 0, (size)*sizeof(char));
-
-        ACE_OS::fread(buffer, sizeof(char), size*sizeof(char), pReadFile);
+        ACE_OS::fread(buffer, sizeof(char), size-1, pReadFile);
         contents = buffer;
 
-        // Clean up buffer
-        delete [] buffer;
-        buffer = NULL;
-
         ACE_OS::fclose(pReadFile);
     }
 

Modified: trunk/MgDev/Server/src/Common/Manager/LogManager.h
===================================================================
--- trunk/MgDev/Server/src/Common/Manager/LogManager.h	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Common/Manager/LogManager.h	2010-09-23 19:54:29 UTC (rev 5183)
@@ -225,7 +225,7 @@
     STRING connInfoUserName = L""; \
     try \
     { \
-        MgUserInformation* pUserInfo = MgUserInformation::GetCurrentUserInfo(); \
+        Ptr<MgUserInformation> pUserInfo = MgUserInformation::GetCurrentUserInfo(); \
         MgConnection* pConnection = MgConnection::GetCurrentConnection(); \
         /* Get client version. This needs to come from the web tier. */ \
         /* For logs involving operations, this will be stored in MgUserInformation. */ \
@@ -301,7 +301,7 @@
     static MgLogManager* GetInstance();
     void Initialize();
     void LoadConfigurationProperties();
-    CREFSTRING GetLogsPath();
+    STRING GetLogsPath();
     void SetMaximumLogSize(INT32 size);
     void SetLogDelimiter(CREFSTRING delimiter);
     STRING GetLogDelimiter();

Modified: trunk/MgDev/Server/src/Common/Manager/LongTransactionManager.cpp
===================================================================
--- trunk/MgDev/Server/src/Common/Manager/LongTransactionManager.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Common/Manager/LongTransactionManager.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -76,7 +76,7 @@
     ACE_MT(ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, ace_mon, sm_mutex, false));
 
     STRING sessionId;
-    MgUserInformation* userInfo = MgUserInformation::GetCurrentUserInfo();
+    Ptr<MgUserInformation> userInfo = MgUserInformation::GetCurrentUserInfo();
     if (userInfo != NULL)
         sessionId = userInfo->GetMgSessionId();
 

Modified: trunk/MgDev/Server/src/Common/Manager/PackageLogHandler.h
===================================================================
--- trunk/MgDev/Server/src/Common/Manager/PackageLogHandler.h	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Common/Manager/PackageLogHandler.h	2010-09-23 19:54:29 UTC (rev 5183)
@@ -70,8 +70,8 @@
 
     virtual void Dispose();
 
-    CREFSTRING GetPackagePathname() const;
-    CREFSTRING GetLogPathname() const;
+    STRING GetPackagePathname() const;
+    STRING GetLogPathname() const;
     MgPackageStatusInformation& GetStatusInfo();
 
     void End();
@@ -96,12 +96,12 @@
 
 /// Inline Methods
 
-inline CREFSTRING MgPackageLogHandler::GetPackagePathname() const
+inline STRING MgPackageLogHandler::GetPackagePathname() const
 {
     return m_packagePathname;
 }
 
-inline CREFSTRING MgPackageLogHandler::GetLogPathname() const
+inline STRING MgPackageLogHandler::GetLogPathname() const
 {
     return m_logPathname;
 }

Modified: trunk/MgDev/Server/src/Common/Manager/PermissionInfo.h
===================================================================
--- trunk/MgDev/Server/src/Common/Manager/PermissionInfo.h	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Common/Manager/PermissionInfo.h	2010-09-23 19:54:29 UTC (rev 5183)
@@ -61,7 +61,7 @@
 public:
 
     time_t GetAccessedTime() const;
-    CREFSTRING GetOwner() const;
+    STRING GetOwner() const;
     bool IsInherited() const;
     const MgUserPermissionMap& GetUserPermissionMap() const;
     const MgGroupPermissionMap& GetGroupPermissionMap() const;
@@ -96,7 +96,7 @@
     return m_accessedTime;
 }
 
-inline CREFSTRING MgPermissionInfo::GetOwner() const
+inline STRING MgPermissionInfo::GetOwner() const
 {
     return m_owner;
 }

Modified: trunk/MgDev/Server/src/Common/Manager/ServerManager.cpp
===================================================================
--- trunk/MgDev/Server/src/Common/Manager/ServerManager.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Common/Manager/ServerManager.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -262,7 +262,7 @@
     MG_CATCH_AND_THROW(L"MgServerManager.LoadConfigurationProperties")
 }
 
-CREFSTRING MgServerManager::GetDefaultMessageLocale()
+STRING MgServerManager::GetDefaultMessageLocale()
 {
     return m_defaultMessageLocale;
 }
@@ -799,7 +799,7 @@
     return m_nAdminThreads;
 }
 
-CREFSTRING MgServerManager::GetAdminEmail()
+STRING MgServerManager::GetAdminEmail()
 {
     return m_adminEmail;
 }

Modified: trunk/MgDev/Server/src/Common/Manager/ServerManager.h
===================================================================
--- trunk/MgDev/Server/src/Common/Manager/ServerManager.h	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Common/Manager/ServerManager.h	2010-09-23 19:54:29 UTC (rev 5183)
@@ -54,7 +54,7 @@
     void Initialize(CREFSTRING locale);
     void LoadConfigurationProperties();
 
-    CREFSTRING GetDefaultMessageLocale();
+    STRING GetDefaultMessageLocale();
 
     MgPropertyCollection* GetConfigurationProperties(CREFSTRING propertySection);
     void SetConfigurationProperties(CREFSTRING propertySection, MgPropertyCollection* properties);
@@ -68,20 +68,20 @@
     void SetDocument(CREFSTRING identifier, MgByteReader* data);
 
     bool IsSiteServer() const;
-    CREFSTRING GetServerName() const;
-    CREFSTRING GetLocalServerAddress() const;
+    STRING GetServerName() const;
+    STRING GetLocalServerAddress() const;
 
     // Admin Properties
     INT32 GetAdminPort();
     INT32 GetAdminThreads();
-    CREFSTRING GetAdminEmail();
+    STRING GetAdminEmail();
 
     // Client Properties
     INT32 GetClientPort();
     INT32 GetClientThreads();
 
     // Site Properties
-    CREFSTRING GetSiteServerAddress() const;
+    STRING GetSiteServerAddress() const;
     INT32 GetSitePort();
     INT32 GetSiteThreads();
 
@@ -201,17 +201,17 @@
     return m_isSiteServer;
 }
 
-inline CREFSTRING MgServerManager::GetServerName() const
+inline STRING MgServerManager::GetServerName() const
 {
     return m_displayName;
 }
 
-inline CREFSTRING MgServerManager::GetLocalServerAddress() const
+inline STRING MgServerManager::GetLocalServerAddress() const
 {
     return m_localServerAddress;
 }
 
-inline CREFSTRING MgServerManager::GetSiteServerAddress() const
+inline STRING MgServerManager::GetSiteServerAddress() const
 {
     return m_siteServerAddress;
 }

Modified: trunk/MgDev/Server/src/Common/Manager/ServiceManager.cpp
===================================================================
--- trunk/MgDev/Server/src/Common/Manager/ServiceManager.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Common/Manager/ServiceManager.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -165,7 +165,7 @@
 ///
 MgService* MgServiceManager::RequestLocalService(INT32 serviceType)
 {
-    MgUserInformation* currUserInfo = MgUserInformation::GetCurrentUserInfo();
+    Ptr<MgUserInformation> currUserInfo = MgUserInformation::GetCurrentUserInfo();
     Ptr<MgConnectionProperties> connProp = new MgConnectionProperties(
         currUserInfo, L"", 0);
 
@@ -186,7 +186,7 @@
     serverAddress = m_loadBalanceManager->RequestServer(serviceType);
 
     // Use the site port for Site/Support Server communications.
-    MgUserInformation* currUserInfo = MgUserInformation::GetCurrentUserInfo();
+    Ptr<MgUserInformation> currUserInfo = MgUserInformation::GetCurrentUserInfo();
     Ptr<MgConnectionProperties> connProp = new MgConnectionProperties(
         currUserInfo, serverAddress, m_serverManager->GetSitePort());
 

Modified: trunk/MgDev/Server/src/Common/Manager/SessionInfo.h
===================================================================
--- trunk/MgDev/Server/src/Common/Manager/SessionInfo.h	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Common/Manager/SessionInfo.h	2010-09-23 19:54:29 UTC (rev 5183)
@@ -44,9 +44,9 @@
 
 public:
 
-    CREFSTRING GetUser() const;
-    CREFSTRING GetClient() const;
-    CREFSTRING GetClientIp() const;
+    STRING GetUser() const;
+    STRING GetClient() const;
+    STRING GetClientIp() const;
     const MgDateTime& GetStartTime() const;
     MgDateTime GetEndTime() const;
     const ACE_Time_Value& GetAccessedTime() const;
@@ -75,17 +75,17 @@
 
 /// Inline Methods
 
-inline CREFSTRING MgSessionInfo::GetUser() const
+inline STRING MgSessionInfo::GetUser() const
 {
     return m_user;
 }
 
-inline CREFSTRING MgSessionInfo::GetClient() const
+inline STRING MgSessionInfo::GetClient() const
 {
     return m_client;
 }
 
-inline CREFSTRING MgSessionInfo::GetClientIp() const
+inline STRING MgSessionInfo::GetClientIp() const
 {
     return m_clientIp;
 }

Modified: trunk/MgDev/Server/src/Common/Manager/UserInfo.cpp
===================================================================
--- trunk/MgDev/Server/src/Common/Manager/UserInfo.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Common/Manager/UserInfo.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -88,7 +88,7 @@
 /// </summary>
 ///----------------------------------------------------------------------------
 
-CREFSTRING MgUserInfo::GetPassword() const
+STRING MgUserInfo::GetPassword() const
 {
     if (m_passwordEncrypted)
     {

Modified: trunk/MgDev/Server/src/Common/Manager/UserInfo.h
===================================================================
--- trunk/MgDev/Server/src/Common/Manager/UserInfo.h	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Common/Manager/UserInfo.h	2010-09-23 19:54:29 UTC (rev 5183)
@@ -39,7 +39,7 @@
 public:
 
     void SetPassword(CREFSTRING password, bool passwordEncrypted = false);
-    CREFSTRING GetPassword() const;
+    STRING GetPassword() const;
 
 /// Data Members
 

Modified: trunk/MgDev/Server/src/Core/Server.cpp
===================================================================
--- trunk/MgDev/Server/src/Core/Server.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Core/Server.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -1196,7 +1196,7 @@
 
     MG_TRY()
 
-    MgUserInformation* currUserInfo = MgUserInformation::GetCurrentUserInfo();
+    Ptr<MgUserInformation> currUserInfo = MgUserInformation::GetCurrentUserInfo();
 
     if (NULL != currUserInfo)
     {

Modified: trunk/MgDev/Server/src/Core/main.cpp
===================================================================
--- trunk/MgDev/Server/src/Core/main.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Core/main.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -72,8 +72,20 @@
     XMLPlatformUtils::Initialize();
 
 #ifndef _WIN32
-    // Set memory checking to report only and not abort
-    mallopt(M_CHECK_ACTION, 1);
+    MgConfiguration* pConfiguration = MgConfiguration::GetInstance();
+    pConfiguration->LoadConfiguration(MgConfigProperties::ServerConfigurationFilename);
+    bool bDebugMem = false;
+    pConfiguration->GetBoolValue(MgConfigProperties::GeneralPropertiesSection, MgConfigProperties::GeneralPropertyLinuxMemDebug, bDebugMem, MgConfigProperties::DefaultGeneralPropertyLinuxMemDebug);
+    if (!bDebugMem)
+    {
+        // Set memory checking to report only and not abort
+        mallopt(M_CHECK_ACTION, 1);
+    }
+    else
+    {
+        // Set memory checking to report and abort
+        mallopt(M_CHECK_ACTION, 3);
+    }
 #endif
 
     MG_TRY()

Modified: trunk/MgDev/Server/src/Services/Feature/ServerFeatureService.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/ServerFeatureService.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Services/Feature/ServerFeatureService.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -265,7 +265,7 @@
 {
     MG_LOG_TRACE_ENTRY(L"MgServerFeatureService::GetCapabilities()");
 
-    MgUserInformation* userInfo =  MgUserInformation::GetCurrentUserInfo();
+    Ptr<MgUserInformation> userInfo =  MgUserInformation::GetCurrentUserInfo();
     if (userInfo->GetApiVersion() != MG_API_VERSION(1,0,0) && userInfo->GetApiVersion() != MG_API_VERSION(2,0,0))
     {
         throw new MgInvalidOperationVersionException(
@@ -1029,7 +1029,7 @@
 
     // we require a session ID
     STRING sessionId;
-    MgUserInformation* userInfo = MgUserInformation::GetCurrentUserInfo();
+    Ptr<MgUserInformation> userInfo = MgUserInformation::GetCurrentUserInfo();
     if (userInfo != NULL)
         sessionId = userInfo->GetMgSessionId();
 

Modified: trunk/MgDev/Server/src/Services/Feature/ServerGetProviderCapabilities.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/ServerGetProviderCapabilities.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Services/Feature/ServerGetProviderCapabilities.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -84,7 +84,7 @@
     // no more risk of exceptions, so we can now assign these
     m_fdoConn = fdoConn.Detach();
     m_providerName = providerNoVersion;
-    MgUserInformation* userInfo =  MgUserInformation::GetCurrentUserInfo();
+    Ptr<MgUserInformation> userInfo =  MgUserInformation::GetCurrentUserInfo();
     m_version = userInfo->GetApiVersion();
 }
 

Modified: trunk/MgDev/Server/src/Services/Kml/ServerKmlService.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Kml/ServerKmlService.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Services/Kml/ServerKmlService.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -255,7 +255,8 @@
     {
         // Create a new, empty map
         Ptr<MgSiteConnection> siteConn = new MgSiteConnection();
-        siteConn->Open(MgUserInformation::GetCurrentUserInfo());
+        Ptr<MgUserInformation> userInfo = MgUserInformation::GetCurrentUserInfo();
+        siteConn->Open(userInfo);
         Ptr<MgMap> map = new MgMap(siteConn);
         map->Create(GOOGLE_EARTH_WKT, extents, L"Google Earth Map");
         map->SetDisplayWidth(width);
@@ -846,7 +847,7 @@
 STRING MgServerKmlService::GetSessionId()
 {
     STRING sessionId;
-    MgUserInformation* userInfo = MgUserInformation::GetCurrentUserInfo();
+    Ptr<MgUserInformation> userInfo = MgUserInformation::GetCurrentUserInfo();
     if (userInfo != NULL)
     {
         sessionId = userInfo->GetMgSessionId();

Modified: trunk/MgDev/Server/src/Services/Mapping/ServerMappingService.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Mapping/ServerMappingService.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Services/Mapping/ServerMappingService.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -468,7 +468,7 @@
 
     // get the session ID
     STRING sessionId;
-    MgUserInformation* userInfo = MgUserInformation::GetCurrentUserInfo();
+    Ptr<MgUserInformation> userInfo = MgUserInformation::GetCurrentUserInfo();
     if (userInfo != NULL)
         sessionId = userInfo->GetMgSessionId();
 
@@ -1203,7 +1203,7 @@
 
         // Get the session ID
         STRING sessionId;
-        MgUserInformation* userInfo = MgUserInformation::GetCurrentUserInfo();
+        Ptr<MgUserInformation> userInfo = MgUserInformation::GetCurrentUserInfo();
         if (userInfo != NULL)
             sessionId = userInfo->GetMgSessionId();
 

Modified: trunk/MgDev/Server/src/Services/Rendering/ServerRenderingService.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Rendering/ServerRenderingService.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Services/Rendering/ServerRenderingService.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -843,7 +843,7 @@
 
     // get the session ID
     STRING sessionId;
-    MgUserInformation* userInfo = MgUserInformation::GetCurrentUserInfo();
+    Ptr<MgUserInformation> userInfo = MgUserInformation::GetCurrentUserInfo();
     if (userInfo != NULL)
         sessionId = userInfo->GetMgSessionId();
 
@@ -1277,7 +1277,7 @@
 
     // get the session ID
     STRING sessionId;
-    MgUserInformation* userInfo = MgUserInformation::GetCurrentUserInfo();
+    Ptr<MgUserInformation> userInfo = MgUserInformation::GetCurrentUserInfo();
     if (userInfo != NULL)
         sessionId = userInfo->GetMgSessionId();
 

Modified: trunk/MgDev/Server/src/Services/Resource/ApplicationRepository.h
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/ApplicationRepository.h	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Services/Resource/ApplicationRepository.h	2010-09-23 19:54:29 UTC (rev 5183)
@@ -45,7 +45,7 @@
     public:
 
         MgResourceDatabase* GetResourceDataStreamDatabase() const;
-        CREFSTRING GetResourceDataFilePath() const;
+        STRING GetResourceDataFilePath() const;
 
 /// Data Members
 
@@ -57,7 +57,7 @@
 
 /// Inline Methods
 
-inline CREFSTRING MgApplicationRepository::GetResourceDataFilePath() const
+inline STRING MgApplicationRepository::GetResourceDataFilePath() const
 {
     return m_resourceDataFilePath;
 }

Modified: trunk/MgDev/Server/src/Services/Resource/ApplicationRepositoryManager.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/ApplicationRepositoryManager.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Services/Resource/ApplicationRepositoryManager.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -54,7 +54,7 @@
     // up based on the current session ID.
 
     m_currUserInfo = new MgUserInformation;
-    MgUserInformation* currUserInfo = MgUserInformation::GetCurrentUserInfo();
+    Ptr<MgUserInformation> currUserInfo = MgUserInformation::GetCurrentUserInfo();
     assert(NULL != currUserInfo);
     STRING sessionId = currUserInfo->GetMgSessionId();
     STRING userName = currUserInfo->GetUserName();

Modified: trunk/MgDev/Server/src/Services/Resource/DataBindingInfo.h
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/DataBindingInfo.h	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Services/Resource/DataBindingInfo.h	2010-09-23 19:54:29 UTC (rev 5183)
@@ -34,10 +34,10 @@
 
         MgDataBindingInfo& operator=(const MgDataBindingInfo& dataBindingInfo);
 
-        CREFSTRING GetPreProcessTags() const;
-        CREFSTRING GetResourceDataFilePath() const;
-        CREFSTRING GetLoginUsername() const;
-        CREFSTRING GetLoginPassword() const;
+        STRING GetPreProcessTags() const;
+        STRING GetResourceDataFilePath() const;
+        STRING GetLoginUsername() const;
+        STRING GetLoginPassword() const;
         bool GetSubstituteUnmanagedDataMappings() const;
 
         void SetPreProcessTags(CREFSTRING preProcessTags);
@@ -59,22 +59,22 @@
 
 /// Inline Methods
 
-inline CREFSTRING MgDataBindingInfo::GetPreProcessTags() const
+inline STRING MgDataBindingInfo::GetPreProcessTags() const
 {
     return m_preProcessTags;
 }
 
-inline CREFSTRING MgDataBindingInfo::GetResourceDataFilePath() const
+inline STRING MgDataBindingInfo::GetResourceDataFilePath() const
 {
     return m_resourceDataFilePath;
 }
 
-inline CREFSTRING MgDataBindingInfo::GetLoginUsername() const
+inline STRING MgDataBindingInfo::GetLoginUsername() const
 {
     return m_loginUsername;
 }
 
-inline CREFSTRING MgDataBindingInfo::GetLoginPassword() const
+inline STRING MgDataBindingInfo::GetLoginPassword() const
 {
     return m_loginPassword;
 }

Modified: trunk/MgDev/Server/src/Services/Resource/OperationInfo.h
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/OperationInfo.h	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Services/Resource/OperationInfo.h	2010-09-23 19:54:29 UTC (rev 5183)
@@ -58,10 +58,10 @@
 public:
     MgOperationInfo& operator=(const MgOperationInfo& opInfo);
 
-    CREFSTRING GetName() const;
+    STRING GetName() const;
     void SetName(CREFSTRING name);
 
-    CREFSTRING GetVersion() const;
+    STRING GetVersion() const;
     void SetVersion(CREFSTRING version);
 
     const MgOperationParameter& GetParameter(CREFSTRING name,
@@ -86,13 +86,13 @@
 
 /// Inline Methods
 
-inline CREFSTRING MgOperationInfo::GetName() const
+inline STRING MgOperationInfo::GetName() const
 {
     return m_name;
 }
 
 
-inline CREFSTRING MgOperationInfo::GetVersion() const
+inline STRING MgOperationInfo::GetVersion() const
 {
     return m_version;
 }

Modified: trunk/MgDev/Server/src/Services/Resource/OperationParameter.h
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/OperationParameter.h	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Services/Resource/OperationParameter.h	2010-09-23 19:54:29 UTC (rev 5183)
@@ -32,10 +32,10 @@
 public:
     MgOperationParameter& operator=(const MgOperationParameter& opParam);
 
-    CREFSTRING GetValue() const;
+    STRING GetValue() const;
     void SetValue(CREFSTRING value);
 
-    CREFSTRING GetContentType() const;
+    STRING GetContentType() const;
     void SetContentType(CREFSTRING contentType);
 
 /// Data Members
@@ -67,13 +67,13 @@
 
 /// Inline Methods
 
-inline CREFSTRING MgOperationParameter::GetValue() const
+inline STRING MgOperationParameter::GetValue() const
 {
     return m_value;
 }
 
 
-inline CREFSTRING MgOperationParameter::GetContentType() const
+inline STRING MgOperationParameter::GetContentType() const
 {
     return m_contentType;
 }

Modified: trunk/MgDev/Server/src/Services/Resource/ResourcePackageManifestHandler.h
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/ResourcePackageManifestHandler.h	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Services/Resource/ResourcePackageManifestHandler.h	2010-09-23 19:54:29 UTC (rev 5183)
@@ -41,7 +41,7 @@
 
 public:
 
-    CREFSTRING GetDescription() const;
+    STRING GetDescription() const;
     void SetDescription(CREFSTRING description);
 
 /// Data Members
@@ -58,7 +58,7 @@
 
 /// Inline Methods
 
-inline CREFSTRING MgResourcePackageManifestHandler::GetDescription() const
+inline STRING MgResourcePackageManifestHandler::GetDescription() const
 {
     return m_description;
 }

Modified: trunk/MgDev/Server/src/Services/Resource/SiteRepositoryManager.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/SiteRepositoryManager.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Services/Resource/SiteRepositoryManager.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -211,7 +211,7 @@
         // TODO: Remove this option if it is not in use.
 
         MgSecurityManager securityMan;
-        MgUserInformation* currUserInfo = MgUserInformation::GetCurrentUserInfo();
+        Ptr<MgUserInformation> currUserInfo = MgUserInformation::GetCurrentUserInfo();
         assert(NULL != currUserInfo);
         STRING userName = currUserInfo->GetUserName();
 

Modified: trunk/MgDev/Server/src/Services/ServerAdmin/OpNotifyResourcesChanged.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/ServerAdmin/OpNotifyResourcesChanged.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Services/ServerAdmin/OpNotifyResourcesChanged.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -86,7 +86,8 @@
 
         // Validate() not called here because this is an internal server-only operation.
         // Instead, MgSecurityManager::Authenticate() should be called to perform authentication.
-        MgSecurityManager::Authenticate(MgUserInformation::GetCurrentUserInfo());
+        Ptr<MgUserInformation> userInfo = MgUserInformation::GetCurrentUserInfo();
+        MgSecurityManager::Authenticate(userInfo);
 
         m_service->NotifyResourcesChanged(resources);
 

Modified: trunk/MgDev/Server/src/Services/ServerAdmin/OpRegisterServicesOnServers.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/ServerAdmin/OpRegisterServicesOnServers.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Services/ServerAdmin/OpRegisterServicesOnServers.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -76,7 +76,8 @@
 
         // Validate() not called here because this is an internal server-only operation.
         // Instead, MgSecurityManager::Authenticate() should be called to perform authentication.
-        MgSecurityManager::Authenticate(MgUserInformation::GetCurrentUserInfo());
+        Ptr<MgUserInformation> userInfo = MgUserInformation::GetCurrentUserInfo();
+        MgSecurityManager::Authenticate(userInfo);
 
         Ptr<MgSerializableCollection> feedbackList = m_service->RegisterServicesOnServers(serverInfoList);
 

Modified: trunk/MgDev/Server/src/Services/ServerAdmin/OpUnregisterServicesOnServers.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/ServerAdmin/OpUnregisterServicesOnServers.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Services/ServerAdmin/OpUnregisterServicesOnServers.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -76,7 +76,8 @@
 
         // Validate() not called here because this is an internal server-only operation.
         // Instead, MgSecurityManager::Authenticate() should be called to perform authentication.
-        MgSecurityManager::Authenticate(MgUserInformation::GetCurrentUserInfo());
+        Ptr<MgUserInformation> userInfo = MgUserInformation::GetCurrentUserInfo();
+        MgSecurityManager::Authenticate(userInfo);
 
         m_service->UnregisterServicesOnServers(serverInfoList);
 

Modified: trunk/MgDev/Server/src/Services/Site/ServerSiteService.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Site/ServerSiteService.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Services/Site/ServerSiteService.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -728,7 +728,7 @@
 STRING MgServerSiteService::CreateSession()
 {
     STRING session;
-    MgUserInformation* currUserInfo = MgUserInformation::GetCurrentUserInfo();
+    Ptr<MgUserInformation> currUserInfo = MgUserInformation::GetCurrentUserInfo();
     assert(NULL != currUserInfo);
 
     MG_SITE_SERVICE_TRY()
@@ -839,7 +839,7 @@
 {
     STRING session;
     STRING userId;
-    MgUserInformation* currUserInfo = MgUserInformation::GetCurrentUserInfo();
+    Ptr<MgUserInformation> currUserInfo = MgUserInformation::GetCurrentUserInfo();
     assert(NULL != currUserInfo);
 
     MG_SITE_SERVICE_TRY()
@@ -1067,7 +1067,7 @@
 {
     bool bAllowed = false;
 
-    MgUserInformation* userInfo = MgUserInformation::GetCurrentUserInfo();
+    Ptr<MgUserInformation> userInfo = MgUserInformation::GetCurrentUserInfo();
     STRING currUser = userInfo->GetUserName();
     if (currUser.empty())
     {

Modified: trunk/MgDev/Server/src/Services/Tile/ServerTileService.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Tile/ServerTileService.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/Services/Tile/ServerTileService.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -234,7 +234,8 @@
             else
             {
                 Ptr<MgSiteConnection> siteConn = new MgSiteConnection();
-                siteConn->Open(MgUserInformation::GetCurrentUserInfo());
+                Ptr<MgUserInformation> userInfo = MgUserInformation::GetCurrentUserInfo();
+                siteConn->Open(userInfo);
                 map = new MgMap(siteConn);
                 map->Create(resourceService, mapDefinition, mapString);
                 cachedMap = new MgMemoryStreamHelper();

Modified: trunk/MgDev/Server/src/UnitTesting/TestKmlService.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestKmlService.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Server/src/UnitTesting/TestKmlService.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -416,7 +416,7 @@
     STRING newContent = content;
 
     STRING sessionId;
-    MgUserInformation* userInfo = MgUserInformation::GetCurrentUserInfo();
+    Ptr<MgUserInformation> userInfo = MgUserInformation::GetCurrentUserInfo();
     if (userInfo != NULL)
     {
         sessionId = userInfo->GetMgSessionId();

Modified: trunk/MgDev/Web/src/HttpHandler/HttpWmsGetCapabilities.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpWmsGetCapabilities.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Web/src/HttpHandler/HttpWmsGetCapabilities.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -46,7 +46,7 @@
 bool GetDocument(CPSZ pszDoc,REFSTRING sRet)
 {
     //TODO: Remove dependency on thread local storage
-    MgUserInformation* userInfo = MgUserInformation::GetCurrentUserInfo();
+    Ptr<MgUserInformation> userInfo = MgUserInformation::GetCurrentUserInfo();
     Ptr<MgServerAdmin> serverAdmin = new MgServerAdmin();
     serverAdmin->Open(userInfo);
 

Modified: trunk/MgDev/Web/src/HttpHandler/WmsMapUtil.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/WmsMapUtil.cpp	2010-09-23 09:13:47 UTC (rev 5182)
+++ trunk/MgDev/Web/src/HttpHandler/WmsMapUtil.cpp	2010-09-23 19:54:29 UTC (rev 5183)
@@ -46,7 +46,7 @@
 bool MgWmsMapUtil::GetDocument(CPSZ pszDoc,REFSTRING sRet)
 {
     //TODO: Remove dependency on thread local storage
-    MgUserInformation* userInfo = MgUserInformation::GetCurrentUserInfo();
+    Ptr<MgUserInformation> userInfo = MgUserInformation::GetCurrentUserInfo();
     Ptr<MgServerAdmin> serverAdmin = new MgServerAdmin();
     serverAdmin->Open(userInfo);
 



More information about the mapguide-commits mailing list