summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/UserInfoEx/src')
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp3
-rw-r--r--plugins/UserInfoEx/src/mir_db.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
index 735e2b71d3..bc50caf32e 100644
--- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
+++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
@@ -390,7 +390,8 @@ BYTE CExImContactXML::ExportEvents()
int dwNumEventsAdded = 0;
// read out all events for the current contact
- for (MEVENT hDbEvent = db_event_first(_hContact); hDbEvent != NULL; hDbEvent = db_event_next(_hContact, hDbEvent)) {
+ DB::ECPTR pCursor(DB::Events(_hContact));
+ while (MEVENT hDbEvent = pCursor.FetchNext()) {
DBEVENTINFO dbei = {};
if (DB::Event::GetInfoWithData(hDbEvent, &dbei))
continue;
diff --git a/plugins/UserInfoEx/src/mir_db.cpp b/plugins/UserInfoEx/src/mir_db.cpp
index 9b4c936e9d..cbd411f569 100644
--- a/plugins/UserInfoEx/src/mir_db.cpp
+++ b/plugins/UserInfoEx/src/mir_db.cpp
@@ -34,7 +34,8 @@ namespace Contact {
DWORD WhenAdded(DWORD dwUIN, LPCSTR)
{
DBEVENTINFO dbei = {};
- for (MEVENT edbe = db_event_first(NULL); edbe != NULL; edbe = db_event_next(NULL, edbe)) {
+ DB::ECPTR pCursor(DB::Events(0));
+ while (MEVENT edbe = pCursor.FetchNext()) {
// get eventtype and compare
if (!DB::Event::GetInfo(edbe, &dbei) && dbei.eventType == EVENTTYPE_ADDED) {
if (!DB::Event::GetInfoWithData(edbe, &dbei)) {