--- a/memspy/Engine/Source/ThreadAndProcess/MemSpyEngineObjectThreadInfoObjects.cpp Wed Sep 15 13:53:27 2010 +0300
+++ b/memspy/Engine/Source/ThreadAndProcess/MemSpyEngineObjectThreadInfoObjects.cpp Wed Oct 13 16:17:58 2010 +0300
@@ -123,17 +123,6 @@
return TPtrC( item->Combined() );
}
-EXPORT_C TPtrC CMemSpyThreadInfoItemBase::Caption(TInt aIndex ) const
- {
- CItem* item = iItems[ aIndex ];
- return TPtrC( item->Caption() );
- }
-
-EXPORT_C TPtrC CMemSpyThreadInfoItemBase::Value(TInt aIndex ) const
- {
- CItem* item = iItems[ aIndex ];
- return TPtrC( item->Value() );
- }
EXPORT_C CMemSpyEngine& CMemSpyThreadInfoItemBase::Engine() const
{
@@ -1702,18 +1691,20 @@
#endif
// See if we have an entry with that name...
- TInt foundIndex = 0;
- TRAP(ret, foundIndex = FindServerL(aName));
+ TIdentityRelation<CSessionInfoEntry> comparer( CompareEntries );
+ HBufC* name = aName.AllocLC();
+ CSessionInfoEntry* entry = new(ELeave) CSessionInfoEntry( name );
+ CleanupStack::Pop( name );
+ CleanupStack::PushL( entry );
+ const TInt foundIndex = iServerNames.Find( entry, comparer );
+ CleanupStack::PopAndDestroy( entry );
- if (ret == KErrNone)
+ // If we did, get the count
+ if ( foundIndex >=0 && foundIndex < iServerNames.Count() )
{
- // If we did, get the count
- if ( foundIndex >=0 && foundIndex < iServerNames.Count() )
- {
- ret = iServerNames[ foundIndex ]->iCount;
- }
+ ret = iServerNames[ foundIndex ]->iCount;
}
-
+ //
#ifdef _DEBUG
RDebug::Printf( "CMemSpyThreadInfoSession::ConnectionCount() - END - ret: %d", ret );
#endif
@@ -1721,22 +1712,10 @@
return ret;
}
-TInt CMemSpyThreadInfoSession::FindServerL( const TDesC& aName ) const
- {
- TIdentityRelation<CSessionInfoEntry> comparer( CompareEntries );
- HBufC* name = aName.AllocLC();
- CSessionInfoEntry* entry = new(ELeave) CSessionInfoEntry( name );
- CleanupStack::Pop( name ); // don't destroy it as name is now owned by entry
- CleanupStack::PushL( entry );
- const TInt foundIndex = iServerNames.Find( entry, comparer );
- User::LeaveIfError(foundIndex); // so we only return a real index
- CleanupStack::PopAndDestroy( entry );
- return foundIndex;
- }
void CMemSpyThreadInfoSession::HandleContainerItemL( TMemSpyDriverHandleInfoGeneric& aItem, TInt /*aRefCount*/, TDes& aFullName )
{
- // Check whether we have the item already
+ // Check whether we have the item already?
TIdentityRelation<CSessionInfoEntry> comparer( CompareEntries );
// Prepare object, just in case we don't find it...