--- a/serviceproviders/sapi_contacts_vpbk/tsrc/dev/tcontacts_async/src/tcontacts_async_blocks.cpp Tue May 25 13:38:11 2010 +0300
+++ b/serviceproviders/sapi_contacts_vpbk/tsrc/dev/tcontacts_async/src/tcontacts_async_blocks.cpp Mon Jun 21 16:39:57 2010 +0300
@@ -112,7 +112,11 @@
}
void CContactsUT::HandleReturnId( const TInt& aError, HBufC8* acntId, TInt aTransId )
{
+ delete acntId;
CActiveScheduler::Stop();
+ if(aError == KErrNone)
+ iErr = KErrNone;
+
}
void CContactsUT::HandleReturnArray(const TInt& aError, RPointerArray<HBufC8>& aArray, TInt aTransId )
@@ -203,10 +207,11 @@
iLog->Log(_L("Phone Contact Field modified \n"));
__UHEAP_MARK;
iServiceHandle->AddL(this,0,singleContact);
+ __UHEAP_MARKEND;
+
iLog->Log(_L("AddL called\n"));
iLog->Log(_L("Start Active Scheduler\n"));
CActiveScheduler::Start();
- __UHEAP_MARKEND;
break;
}
}
@@ -660,7 +665,7 @@
iErr = KErrNone;
- __UHEAP_MARK;
+ // __UHEAP_MARK;
iOp = iContactManager->MatchPhoneNumberL(
KPhoneNumber, KPhoneNumber().Length(), *this );
CActiveScheduler::Start();
@@ -686,7 +691,7 @@
iContactToDelete = NULL;
- __UHEAP_MARKEND;
+ // __UHEAP_MARKEND;
}
//Add 1 contact
@@ -3156,7 +3161,7 @@
{
while(count)
{
- //__UHEAP_MARK;
+ __UHEAP_MARK;
iBuffer = (const_cast<MVPbkContactLink&>(iFindResults->At(--count))).PackLC();
CleanupStack::Pop();//iBuffer
iServiceHandle = CContactService::NewL();
@@ -3171,7 +3176,7 @@
delete iServiceHandle;//serviceHandle
iServiceHandle = NULL;
iLog->Log( KServiceClose );
- //__UHEAP_MARKEND;
+ __UHEAP_MARKEND;
}
}
--- a/serviceproviders/sapi_contacts_vpbk/tsrc/testing/tcontact_getlist/src/tcontact_getlistblocks.cpp Tue May 25 13:38:11 2010 +0300
+++ b/serviceproviders/sapi_contacts_vpbk/tsrc/testing/tcontact_getlist/src/tcontact_getlistblocks.cpp Mon Jun 21 16:39:57 2010 +0300
@@ -619,10 +619,6 @@
CContactIter* iter = CContactIter::NewL();
icontactservice->GetListL(*iter);
- delete iter;
- delete icallback;
- delete icontactservice;
- __UHEAP_MARKEND;
TPtrC buf(_L(""));
iter->NextL(buf);
@@ -631,16 +627,15 @@
{ count++;
iter->NextL(buf);
}
- if(count==2)
- {
+ delete iter;
+ delete icallback;
+ delete icontactservice;
+ __UHEAP_MARKEND;
+ if(count==2)
return KErrNone ;
- }
-delete iter;
- delete icallback;
- delete icontactservice;
- //__UHEAP_MARKEND;
- return KErrGeneral;
+ else
+ return KErrGeneral;
}
/* get all contacts from the phonebook ie contacts.cdb,manual*/