[mapguide-commits] r4378 - sandbox/adsk/2.1/Web/src/HttpHandler

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Dec 4 18:40:31 EST 2009


Author: brucedechant
Date: 2009-12-04 18:40:31 -0500 (Fri, 04 Dec 2009)
New Revision: 4378

Modified:
   sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteInfo.cpp
Log:
Fix for trac ticket 1173 - Add performance logging
http://trac.osgeo.org/mapguide/ticket/1173

Notes:
- Moved NEW items CacheSize and CacheDroppedEntries to only show up when the NEW GetSiteInfo request is done so as not to break existing functionality with the original 1.0.0 GetSiteInfo request


Modified: sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteInfo.cpp
===================================================================
--- sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteInfo.cpp	2009-12-04 21:43:12 UTC (rev 4377)
+++ sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteInfo.cpp	2009-12-04 23:40:31 UTC (rev 4378)
@@ -322,17 +322,20 @@
     xml += MgUtil::MultiByteToWideChar(tmpStr);
     xml += L"</Uptime>\n";
 
-    xml += L"\t\t<CacheSize>";
-    int32Prop = (MgInt32Property*)properties->GetItem(MgServerInformationProperties::CacheSize);
-    MgUtil::Int32ToString(int32Prop->GetValue(), tmpStr);
-    xml += MgUtil::MultiByteToWideChar(tmpStr);
-    xml += L"</CacheSize>\n";
+    if (m_userInfo->GetApiVersion() == MG_API_VERSION(2,1,0))
+    {
+        xml += L"\t\t<CacheSize>";
+        int32Prop = (MgInt32Property*)properties->GetItem(MgServerInformationProperties::CacheSize);
+        MgUtil::Int32ToString(int32Prop->GetValue(), tmpStr);
+        xml += MgUtil::MultiByteToWideChar(tmpStr);
+        xml += L"</CacheSize>\n";
 
-    xml += L"\t\t<CacheDroppedEntries>";
-    int32Prop = (MgInt32Property*)properties->GetItem(MgServerInformationProperties::CacheDroppedEntries);
-    MgUtil::Int32ToString(int32Prop->GetValue(), tmpStr);
-    xml += MgUtil::MultiByteToWideChar(tmpStr);
-    xml += L"</CacheDroppedEntries>\n";
+        xml += L"\t\t<CacheDroppedEntries>";
+        int32Prop = (MgInt32Property*)properties->GetItem(MgServerInformationProperties::CacheDroppedEntries);
+        MgUtil::Int32ToString(int32Prop->GetValue(), tmpStr);
+        xml += MgUtil::MultiByteToWideChar(tmpStr);
+        xml += L"</CacheDroppedEntries>\n";
+    }
 
     xml += L"\t</Statistics>\n";
 



More information about the mapguide-commits mailing list