syncmlfw/common/sosserver/src/NSmlTask.cpp
branchRCL_3
changeset 16 915074efc433
parent 0 b497e44ab2fc
child 25 b183ec05bd8c
equal deleted inserted replaced
15:007508d6e57b 16:915074efc433
   376 
   376 
   377 			// Filters
   377 			// Filters
   378 			RReadStream filterStream = ctype->FilterReadStreamL();
   378 			RReadStream filterStream = ctype->FilterReadStreamL();
   379 			CleanupClosePushL( filterStream );
   379 			CleanupClosePushL( filterStream );
   380 			RPointerArray<CSyncMLFilter>* filterArray = new ( ELeave ) RPointerArray<CSyncMLFilter>();
   380 			RPointerArray<CSyncMLFilter>* filterArray = new ( ELeave ) RPointerArray<CSyncMLFilter>();
   381 			CleanupStack::PushL( filterArray );
   381 			CleanupRPtrArrayPushL(filterArray);
       
   382 
   382 			TInt count(0);
   383 			TInt count(0);
   383 			TRAPD(error, count = filterStream.ReadInt32L() );
   384 			TRAPD(error, count = filterStream.ReadInt32L() );
   384 			if ( error == KErrNone )
   385 			if ( error == KErrNone )
   385 				{
   386 				{
   386 				for ( TInt i(0) ; i < count ; i++ )
   387 				for ( TInt i(0) ; i < count ; i++ )
   389 					CleanupStack::Pop();
   390 					CleanupStack::Pop();
   390 					}
   391 					}
   391 				}
   392 				}
   392 			else if ( prof->IntValue( EDSProfileProtocolVersion ) == ESmlVersion1_2 )
   393 			else if ( prof->IntValue( EDSProfileProtocolVersion ) == ESmlVersion1_2 )
   393 				{
   394 				{
   394 				CleanupStack::Pop(); // filterArray;
   395                 CleanupStack::PopAndDestroy(filterArray); 
   395 				filterArray->ResetAndDestroy();
       
   396 				delete filterArray;
       
   397 				filterArray = iSession.HostClient().SupportedServerFiltersL( iTaskUID, matchType, changeInfo, resultCode );				
   396 				filterArray = iSession.HostClient().SupportedServerFiltersL( iTaskUID, matchType, changeInfo, resultCode );				
   398 				CleanupStack::PushL( filterArray );
   397 				CleanupRPtrArrayPushL(filterArray);
   399 				}
   398 				}
   400 		    
   399 		    
   401 			iSession.HostClient().CheckServerFiltersL( iTaskUID, *filterArray, changeInfo, resultCode );
   400 			iSession.HostClient().CheckServerFiltersL( iTaskUID, *filterArray, changeInfo, resultCode );
   402 			
   401 			
   403             CNSmlDSAgentLog* agentLog = CNSmlDSAgentLog::NewLC();
   402             CNSmlDSAgentLog* agentLog = CNSmlDSAgentLog::NewLC();
   433             	CleanupStack::PopAndDestroy(&dbCaps);	
   432             	CleanupStack::PopAndDestroy(&dbCaps);	
   434 				}
   433 				}
   435 				
   434 				
   436             CleanupStack::PopAndDestroy(agentLog);
   435             CleanupStack::PopAndDestroy(agentLog);
   437             
   436             
   438             filterArray->ResetAndDestroy();            
   437             CleanupStack::PopAndDestroy(filterArray);            	
   439 			CleanupStack::PopAndDestroy(filterArray);            	
       
   440             CleanupStack::PopAndDestroy(&filterStream);            
   438             CleanupStack::PopAndDestroy(&filterStream);            
   441             }
   439             }
   442         else
   440         else
   443             {
   441             {
   444             GetSupportedFiltersL();    
   442             GetSupportedFiltersL();