--- a/omaprovisioning/provisioning/ProvisioningEngine/Src/CWPInternetAPDB.cpp Wed Aug 18 10:39:36 2010 +0300
+++ b/omaprovisioning/provisioning/ProvisioningEngine/Src/CWPInternetAPDB.cpp Thu Sep 02 21:22:11 2010 +0300
@@ -241,9 +241,9 @@
Myview.Prepare(iItemsDatabase, TDbQuery(QueryBuffer));
CleanupClosePushL(Myview);
Myview.EvaluateAll();
- Myview.FirstL();
-
- while (Myview.AtRow())
+ if ( Myview.FirstL())
+ {
+ while (Myview.AtRow())
{
Myview.GetL();
@@ -256,6 +256,7 @@
aItemArray.Append(AccessPointItem);
Myview.NextL();
}
+ }
CleanupStack::PopAndDestroy(); // Myview
FLOG( _L( "[Provisioning] CWPInternetAPDB::ReadItemsL: done" ) );
@@ -323,9 +324,9 @@
CleanupClosePushL(Myview);
Myview.EvaluateAll();
- Myview.FirstL();
-
- if (!Myview.IsEmptyL())
+ if( Myview.FirstL())
+ {
+ if (!Myview.IsEmptyL())
{
// we have autoincrement in index so it should be unique
// but just to make sure, we use 'while', instead of 'if'
@@ -341,6 +342,7 @@
iItemsDatabase.Compact();
rowsdeleted = ETrue;
}
+ }
CleanupStack::PopAndDestroy(1); // Myview
FLOG( _L( "[Provisioning] CWPInternetAPDB::DeleteFromDatabaseL: done" ) );