diff options
-rw-r--r-- | protocols/JabberG/src/jabber_archive.cpp | 10 |
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)
|