diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-10-27 11:05:53 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-10-27 11:05:53 +0000 |
commit | bc670c87fb8b24668155deabc75c5b536f165e38 (patch) | |
tree | 256a3c4a418cebc1df7b772758f481a44534e71d /protocols/VKontakte/src | |
parent | 09cebd3613dbad8559060a661a7918c2fd86961d (diff) |
VKontakte: more accurate clear history
git-svn-id: http://svn.miranda-ng.org/main/trunk@10879 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src')
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index d55b9be3db..6e66c0c0c2 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -1145,8 +1145,12 @@ INT_PTR __cdecl CVkProto::SvcGetAllServerHistory(WPARAM hContact, LPARAM) setByte(hContact, "ImportHistory", 1);
setDword(hContact, "lastmsgid", 0);
- while (HANDLE hd = db_event_first(hContact))
- db_event_delete(hContact, hd);
+ HANDLE hDBEvent = db_event_first(hContact);
+ while (hDBEvent) {
+ HANDLE hDBEventNext = db_event_next(hContact, hDBEvent);
+ db_event_delete(hContact, hDBEvent);
+ hDBEvent = hDBEventNext;
+ }
debugLogA("CVkProto::SvcGetAllServerHistory");
GetHistoryDlgMessages(hContact, 0, INT_MAX, -1);
|