diff -r 1f0034e370aa -r 71ad690e91f5 javaextensions/wma/sms_cbs/pushplugin/cbs/src.s60/cbsserverconnection.cpp --- a/javaextensions/wma/sms_cbs/pushplugin/cbs/src.s60/cbsserverconnection.cpp Fri Sep 17 16:44:34 2010 +0300 +++ b/javaextensions/wma/sms_cbs/pushplugin/cbs/src.s60/cbsserverconnection.cpp Mon Oct 04 11:29:25 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -61,7 +61,6 @@ OS_EXPORT CbsServerConnection::~CbsServerConnection() { JELOG2(EWMA); - removeDir(mMessageStoreDirName); } void CbsServerConnection::initializeL() @@ -192,7 +191,8 @@ const java::runtime::ApplicationInfo& appInf = java::runtime::ApplicationInfo::getInstance(); const std::wstring& root = appInf.getRootPath(); - error = createMessageStore(root + CBS_STORE_PATH); + // At this point mIsAppLaunched will be true if it not push connection. + error = createMessageStore(root + CBS_STORE_PATH, mIsAppLaunched); if (error != KErrNone) { ELOG1(EWMA,"CBS : create message store failed : %d",error); @@ -214,12 +214,6 @@ } mOpenMonitor->wait(); - // If there are any messages already available in the message store - // notify the listener - if (mMessagesOnStore > 0) - { - mListener->msgArrived(); - } mIsListening = true; } } @@ -319,7 +313,7 @@ readStream.close(); return KErrGeneral; } - catch (ExceptionBase ex) + catch (ExceptionBase &ex) { delete[] messagePath; return KErrGeneral; @@ -697,7 +691,7 @@ writeStream.close(); User::Leave(KErrGeneral); } - catch (ExceptionBase ex) + catch (ExceptionBase &ex) { User::Leave(KErrGeneral); }