summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/JabberG/src/jabber_thread.cpp')
-rwxr-xr-xprotocols/JabberG/src/jabber_thread.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index bd85a439c9..7e4a20b731 100755
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -980,18 +980,11 @@ DWORD JabberGetLastContactMessageTime(MCONTACT hContact)
if (!hDbEvent)
return 0;
- DWORD dwTime = 0;
-
- DBEVENTINFO dbei = {};
- dbei.cbBlob = db_event_getBlobSize(hDbEvent);
- if (dbei.cbBlob != -1) {
- dbei.pBlob = (PBYTE)mir_alloc(dbei.cbBlob + 1);
- int nGetTextResult = db_event_get(hDbEvent, &dbei);
- if (!nGetTextResult)
- dwTime = dbei.timestamp;
- mir_free(dbei.pBlob);
- }
- return dwTime;
+ DB::EventInfo dbei;
+ if (!db_event_get(hDbEvent, &dbei))
+ return dbei.timestamp;
+
+ return 0;
}
MCONTACT CJabberProto::CreateTemporaryContact(const char *szJid, JABBER_LIST_ITEM* chatItem)