[Clientapps-cvs] symbianMmf/common hxmmfbasectrl.cpp,1.43,1.44

[Clientapps-cvs] symbianMmf/common hxmmfbasectrl.cpp,1.43,1.44

jwei at helixcommunity.org jwei at helixcommunity.org
Mon May 12 13:36:40 PDT 2008


Update of /cvsroot/clientapps/symbianMmf/common
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv31084/common

Modified Files:
	hxmmfbasectrl.cpp 
Log Message:
? escape.diff
Index: hxmmfbasectrl.cpp
===================================================================
RCS file: /cvsroot/clientapps/symbianMmf/common/hxmmfbasectrl.cpp,v
retrieving revision 1.1.2.35.2.3
diff -u -w -b -r1.1.2.35.2.3 hxmmfbasectrl.cpp
--- hxmmfbasectrl.cpp	26 Mar 2008 20:44:42 -0000	1.1.2.35.2.3
+++ hxmmfbasectrl.cpp	8 May 2008 18:13:24 -0000
@@ -68,7 +68,7 @@
 #include "symbian_gm_inst.h"
 #include "chxsymbianliteprefs.h"
 #include "hxmmfcontext.h"
-
+#include "hxescapeutil.h"
 
 
 // for HXSymbianDLLMapInstance
@@ -1044,34 +1044,11 @@
         }
     }
 
-    // esacpe the URL
     if (result == HXR_OK)
     {
-        // 3 for maxiumum possible length of escaped url.
-        char *escapedURL =  new char[m_url.GetLength()*3+1];
-        if (escapedURL != NULL)
-        {
-            INT32 escapedURLLen = URLEscapeBuffer(m_url, m_url.GetLength(), escapedURL);
-
-            if (escapedURLLen > 0)
-            {
-                escapedURL[escapedURLLen] = '\0';
-                m_url = (const char *)escapedURL;
-            }
-            else
-            {
-                result = HXR_INVALID_PARAMETER;
-            }
-            delete[] escapedURL;
-        }
-        else
-        {
-            result = HXR_OUTOFMEMORY;
-        }
-    }
+        // esacpe the URL
+        HXEscapeUtil::EnsureEscapedURL(m_url);
 
-    if (result == HXR_OK)
-    {
         CHXRequest *pRequest = new CHXRequest();
         if (pRequest)
         {
? escape.diff
Index: rtspbase.cpp
===================================================================
RCS file: /cvsroot/protocol/rtsp/rtspbase.cpp,v
retrieving revision 1.26
diff -u -w -b -r1.26 rtspbase.cpp
--- rtspbase.cpp	2 Aug 2005 18:00:42 -0000	1.26
+++ rtspbase.cpp	8 May 2008 18:13:50 -0000
@@ -68,6 +68,7 @@
 #include "rtspbase.h"
 #include "dbcs.h" // for HXIsEqual
 #include "hxtlogutil.h"
+#include "hxescapeutil.h"  //HXEscapeUtil::EscapeSymbol
 
 #include "hxheap.h"
 #ifdef _DEBUG
@@ -334,7 +335,8 @@
             fclose(fp);
         }
 
-        HXLOGL2(HXLOG_RTSP, pMsg);
+        CHXString pMsgString = HXEscapeUtil::EscapeSymbol(pMsg, '%');
+        HXLOGL2(HXLOG_RTSP, pMsgString);
     }
 }
 
Index: rtspclnt.cpp
===================================================================
RCS file: /cvsroot/protocol/rtsp/rtspclnt.cpp,v
retrieving revision 1.182.2.25.2.1
diff -u -w -b -r1.182.2.25.2.1 rtspclnt.cpp
--- rtspclnt.cpp	7 Mar 2008 20:03:49 -0000	1.182.2.25.2.1
+++ rtspclnt.cpp	8 May 2008 18:13:51 -0000
@@ -2748,6 +2748,9 @@
         m_bSDPInitiated = TRUE;
         res = ParseSDP("application/sdp", pSdpData);
         HXLOGL3(HXLOG_RTSP, "RTSPClientProtocol[%p]::InitExtInitSDP(): got sdp data [%p]", this, pSdpData);
+        
+        HXEscapeUtil::EnsureEscapedURL( m_headerControl ); //to make sure URL has been escaped
+        
         if (HXR_OK == res)
         {
             if (m_bMulticast)


Index: hxmmfbasectrl.cpp
===================================================================
RCS file: /cvsroot/clientapps/symbianMmf/common/hxmmfbasectrl.cpp,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- hxmmfbasectrl.cpp	8 May 2008 18:58:59 -0000	1.43
+++ hxmmfbasectrl.cpp	12 May 2008 20:36:38 -0000	1.44
@@ -68,6 +68,7 @@
 #include "symbian_gm_inst.h"
 #include "chxsymbianliteprefs.h"
 #include "hxmmfcontext.h"
+#include "hxescapeutil.h"
 #include "hxmedpltfmloader.h"
 #include "MMFMetadataEventConfigConstants.h"
 
@@ -1171,34 +1172,11 @@
         }
     }
 
-    // esacpe the URL
-    if (result == HXR_OK)
-    {
-        // 3 for maxiumum possible length of escaped url.
-        char *escapedURL =  new char[m_url.GetLength()*3+1];
-        if (escapedURL != NULL)
-        {
-            INT32 escapedURLLen = URLEscapeBuffer(m_url, m_url.GetLength(), escapedURL);
-
-            if (escapedURLLen > 0)
-            {
-                escapedURL[escapedURLLen] = '\0';
-                m_url = (const char *)escapedURL;
-            }
-            else
-            {
-                result = HXR_INVALID_PARAMETER;
-            }
-            delete[] escapedURL;
-        }
-        else
-        {
-            result = HXR_OUTOFMEMORY;
-        }
-    }
-
     if (result == HXR_OK)
     {
+        // esacpe the URL
+        HXEscapeUtil::EnsureEscapedURL(m_url);
+        
         CHXRequest *pRequest = new CHXRequest();
         if (pRequest)
         {




More information about the Clientapps-cvs mailing list
 

Site Map   |   Terms of Use   |   Privacy Policy   |   Contact Us

Copyright © 1995-2007 RealNetworks, Inc. All rights reserved. RealNetworks and Helix are trademarks of RealNetworks.
All other trademarks or registered trademarks are the property of their respective holders.