[mapguide-commits] r6059 - trunk/MgDev/Common/MapGuideCommon/Services

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Aug 11 08:58:12 EDT 2011


Author: liuar
Date: 2011-08-11 05:58:11 -0700 (Thu, 11 Aug 2011)
New Revision: 6059

Modified:
   trunk/MgDev/Common/MapGuideCommon/Services/SiteInfo.cpp
Log:
Submit on behalf of Mars Wu
Implements RFC 118 - IPv6 Support
Ticket: http://trac.osgeo.org/mapguide/ticket/1767
Fixed a problem on Linux: swprintf(...) has different behavior on Linux when %s is specified as the type flag. On Windows, all source str will be copied copied to target buffer. While on Linux, only the first char is copied. 
Fixed this by calling wstring::append instead.

Modified: trunk/MgDev/Common/MapGuideCommon/Services/SiteInfo.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/SiteInfo.cpp	2011-08-11 08:06:51 UTC (rev 6058)
+++ trunk/MgDev/Common/MapGuideCommon/Services/SiteInfo.cpp	2011-08-11 12:58:11 UTC (rev 6059)
@@ -161,9 +161,9 @@
     }
     
     wchar_t buffer[100] = {0};	
-    swprintf(buffer, 100, L"%s%.4X%.4X%.4X", targetHex.c_str(), m_sitePort, m_clientPort, m_adminPort);
+    swprintf(buffer, 100, L"%.4X%.4X%.4X", m_sitePort, m_clientPort, m_adminPort);
 
-    return STRING(buffer);
+    return targetHex.append(buffer);
 }
 
 ///////////////////////////////////////////////////////////////////////////////



More information about the mapguide-commits mailing list