summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_archive.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-06-02 17:11:09 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-06-02 17:11:09 +0000
commit2da44572c7f847664ed7568478c4dc8695909b21 (patch)
treea3c8df0df7ce254824d3bf07a796833ab9c083eb /protocols/JabberG/src/jabber_archive.cpp
parentf15ee5018c08af096bc1c7e64d481a4d0a895bbb (diff)
important fix for XEP-0136 implementation (thx Davis)
git-svn-id: http://svn.miranda-ng.org/main/trunk@16904 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_archive.cpp')
-rw-r--r--protocols/JabberG/src/jabber_archive.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/JabberG/src/jabber_archive.cpp b/protocols/JabberG/src/jabber_archive.cpp
index d33c37e4bb..e532302a42 100644
--- a/protocols/JabberG/src/jabber_archive.cpp
+++ b/protocols/JabberG/src/jabber_archive.cpp
@@ -270,16 +270,16 @@ void CJabberProto::OnIqResultGetCollection(HXML iqNode, CJabberIqInfo*)
DBEVENTINFO dbei = { sizeof(DBEVENTINFO) };
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.szModule = m_szModuleName;
- dbei.cbBlob = (DWORD)mir_strlen(szEventText);
+ dbei.cbBlob = (DWORD)mir_strlen(szEventText)+1;
dbei.flags = DBEF_READ + DBEF_UTF + from;
dbei.pBlob = szEventText;
dbei.timestamp = tmStart + _ttol(tszSecs);
- if (!IsDuplicateEvent(hContact, dbei)) {
+ if (!IsDuplicateEvent(hContact, dbei))
db_event_add(hContact, &dbei);
- if (dbei.timestamp > tmLast)
- tmLast = dbei.timestamp;
- }
+ tmStart = dbei.timestamp;
+ if (dbei.timestamp > tmLast)
+ tmLast = dbei.timestamp;
}
if (tmLast != 0)