diff -r d2517372cc44 -r ae69c2e8bc34 omaprovisioning/provisioning/ProvisioningEngine/Src/CWPBindingContextManager.cpp --- a/omaprovisioning/provisioning/ProvisioningEngine/Src/CWPBindingContextManager.cpp Tue Sep 28 17:53:08 2010 +0530 +++ b/omaprovisioning/provisioning/ProvisioningEngine/Src/CWPBindingContextManager.cpp Fri Oct 15 11:46:45 2010 +0530 @@ -163,14 +163,16 @@ delete colset; User::LeaveIfError( table.SetIndex( KDbIndexDataContextId ) ); - table.SeekL( TDbSeekKey( TUint( aUid ) ) ); - TInt found( 0 ); - while( table.AtRow() && + TInt found( 0 ); + if(table.SeekL( TDbSeekKey( TUint( aUid ) ) )) + { + while( table.AtRow() && (table.GetL(), table.ColUint32( contextId ) == aUid ) ) { found++; table.NextL(); } + } FTRACE(RDebug::Print(_L("[Provisioning] CWPBindingContextManager::ContextDataCountL count (%d)"), found)); CleanupStack::PopAndDestroy(); // table return found;