# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1262861776 -7200 # Node ID b610b446cb01a44461b3edfad2da7f016af39f06 # Parent e6b17d312c8b56b613d677ff58bf94a6bf42dd28 Revision: 200951 Kit: 201001 diff -r e6b17d312c8b -r b610b446cb01 imservices/instantmessagingcache/imcacheclient/src/cimcacheaccesseventhandler.cpp --- 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 )); diff -r e6b17d312c8b -r b610b446cb01 imservices/instantmessagingcache/imcacheclient/src/cimcacheeventhandler.cpp --- 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 )); diff -r e6b17d312c8b -r b610b446cb01 imservices/instantmessagingcache/imcacheserver/src/cimcacheserver.cpp --- 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 } };