From 5a09915186e4ae70cc39e9343ca02a1b860d7f94 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 14 May 2020 12:34:32 +0300 Subject: simple database event cycles moved to cursors --- plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/UserInfoEx/src/ex_import') 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; -- cgit v1.2.3