return nullptr;
}
- for (auto &&usageRecord : makeRange(getPersonUsageList())) {
+ contacts_record_h record = nullptr;
+ contacts_list_h list = getPersonUsageList();
+ for (auto &&usageRecord : makeRange(list)) {
if (getRecordInt(usageRecord, _contacts_person_usage.person_id) == id) {
- contacts_record_h record = nullptr;
contacts_db_get_record(_contacts_person._uri, id, &record);
- return record;
+ break;
}
}
- return nullptr;
+ contacts_list_destroy(list, true);
+ return record;
}
void MfcProvider::insertPerson(contacts_record_h personRecord)
PersonProvider::insertPerson(record);
}
- contacts_list_destroy(list, true);
+ contacts_list_destroy(list, false);
}
void PersonProvider::setUpdateMode(bool isEnabled)
case CONTACTS_CHANGE_UPDATED:
{
int personId = getPersonId(contactId);
- contacts_record_h personRecord = getPersonRecord(contactId, ContactId);
+ contacts_record_h personRecord = getPersonRecord(personId, PersonId);
auto personIt = findPerson(personId, PersonId);
if (personIt != m_PersonList.end()) {