--- a/javaextensions/wma/sms_cbs/pushplugin/src/serverconnectionbase.cpp Fri Apr 30 10:40:48 2010 +0300
+++ b/javaextensions/wma/sms_cbs/pushplugin/src/serverconnectionbase.cpp Tue May 11 16:07:20 2010 +0300
@@ -133,7 +133,16 @@
{
path += std::wstring(tok);
path += L"\\";
- char *dirName = JavaCommonUtils::wstringToUtf8(path);
+ char *dirName =0;
+ try
+ {
+ dirName = JavaCommonUtils::wstringToUtf8(path);
+ }
+ catch (ExceptionBase ex)
+ {
+ delete[] stringToTokenize;
+ return -1;
+ }
if (ableToOpen)
{
if (0 != lstat(dirName, &temp))
@@ -169,10 +178,11 @@
JELOG2(EWMA);
std::wstring path1;
path1 += aDirPath;
+ char* path =0;
int error = 0;
try
{
- char* path = JavaCommonUtils::wstringToUtf8(path1);
+ path = JavaCommonUtils::wstringToUtf8(path1);
LOG1(EWMA, EInfo, "WMA : Removing Message Store %s",path);
struct stat temp;
if (0 != lstat(path, &temp))
@@ -211,7 +221,9 @@
}
catch (ExceptionBase ex)
{
+ delete[] path;
ELOG(EWMA,"WMA : Cought an exception while removing Dir");
+ return -1;
}
return error;
}