[Clientapps-cvs] symbianMmf/common hxmmfbasectrl.cpp, 1.1.2.35.2.3, 1.1.2.35.2.4
jwei at helixcommunity.org jwei at helixcommunity.orgUpdate of /cvsroot/clientapps/symbianMmf/common
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv31026/common
Modified Files:
Tag: hxclient_2_2_1_cayennes
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.1.2.35.2.3
retrieving revision 1.1.2.35.2.4
diff -u -d -r1.1.2.35.2.3 -r1.1.2.35.2.4
--- hxmmfbasectrl.cpp 26 Mar 2008 20:44:42 -0000 1.1.2.35.2.3
+++ hxmmfbasectrl.cpp 12 May 2008 20:36:26 -0000 1.1.2.35.2.4
@@ -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;
- }
- }
-
if (result == HXR_OK)
{
+ // esacpe the URL
+ HXEscapeUtil::EnsureEscapedURL(m_url);
+
CHXRequest *pRequest = new CHXRequest();
if (pRequest)
{