--- a/imservices/instantmessagingcache/imcacheclient/src/cimcacheaccesseventhandler.cpp Thu Dec 17 08:54:49 2009 +0200
+++ b/imservices/instantmessagingcache/imcacheclient/src/cimcacheaccesseventhandler.cpp Thu Jan 07 12:56:16 2010 +0200
@@ -133,8 +133,11 @@
}
TRACE( T_LIT("CIMCacheAccessEventHandler::RunL() iContinueObserving iContinueObserving = %d") ,iContinueObserving);
+ // Comment: cancel operation is changes as synchronous. iContinueObserving from event
+ // can not really be trusted since complete code might be different if leave has occured
+ // for example. Cancel is handled here as generic cancel.
// check need to continue observing to server
- if( iContinueObserving )
+ if( iContinueObserving && KErrCancel != iStatus.Int() )
{
iRegistrar.RegisterObserverToServerL( iStatus ,EIMCacheObserveMessageAccessRegister );
SetActive();
@@ -148,6 +151,9 @@
void CIMCacheAccessEventHandler::DoCancel()
{
TRACE( T_LIT("CIMCacheAccessEventHandler::DoCancel() ") );
+ // Comment: set to EFalse here since we can not trust other changes. See
+ // comments in RunL
+ iContinueObserving = EFalse;
if( IsActive() )
{
TRAP_IGNORE(iRegistrar.CancelRequestL( iStatus ,EIMCacheCancelRequest ));
--- a/imservices/instantmessagingcache/imcacheclient/src/cimcacheeventhandler.cpp Thu Dec 17 08:54:49 2009 +0200
+++ b/imservices/instantmessagingcache/imcacheclient/src/cimcacheeventhandler.cpp Thu Jan 07 12:56:16 2010 +0200
@@ -142,9 +142,12 @@
}
}
+ // Comment: cancel operation is changes as synchronous. iContinueObserving from event
+ // can not really be trusted since complete code might be different if leave has occured
+ // for example. Cancel is handled here as generic cancel.
TRACE( T_LIT("CIMCacheEventHandler::RunL() iContinueObserving iContinueObserving = %d") ,iContinueObserving);
// check need to continue observing to server
- if( iContinueObserving )
+ if( iContinueObserving && KErrCancel != iStatus.Int() )
{
iRegistrar.RegisterObserverToServerL( iStatus ,EIMCacheObserveMessageUpdateRegister );
SetActive();
@@ -158,6 +161,9 @@
void CIMCacheEventHandler::DoCancel()
{
TRACE( T_LIT("CIMCacheEventHandler::DoCancel() ") );
+ // Comment: set to EFalse here since we can not trust other changes. See
+ // comments in RunL
+ iContinueObserving = EFalse;
if( IsActive() )
{
TRAP_IGNORE(iRegistrar.CancelRequestL( iStatus ,EIMCacheCancelRequest ));
--- a/imservices/instantmessagingcache/imcacheserver/src/cimcacheserver.cpp Thu Dec 17 08:54:49 2009 +0200
+++ b/imservices/instantmessagingcache/imcacheserver/src/cimcacheserver.cpp Thu Jan 07 12:56:16 2010 +0200
@@ -58,7 +58,7 @@
{
_INIT_SECURITY_POLICY_C2( ECapabilityReadUserData,
ECapabilityWriteUserData ),
- -5 //CPolicyServer::EFailClient
+ CPolicyServer::EFailClient
}
};