summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_db.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/SkypeWeb/src/skype_db.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_db.cpp25
1 files changed, 9 insertions, 16 deletions
diff --git a/protocols/SkypeWeb/src/skype_db.cpp b/protocols/SkypeWeb/src/skype_db.cpp
index c5b3aa348c..8a0869ab04 100644
--- a/protocols/SkypeWeb/src/skype_db.cpp
+++ b/protocols/SkypeWeb/src/skype_db.cpp
@@ -43,10 +43,15 @@ MEVENT CSkypeProto::AddDbEvent(WORD type, MCONTACT hContact, DWORD timestamp, DW
if (MEVENT hDbEvent = GetMessageFromDb(uid))
return hDbEvent;
- MEVENT ret = AddEventToDb(hContact, type, timestamp, flags, (DWORD)mir_strlen(content)+1, (BYTE*)content);
- if (uid && ret)
- db_event_setId(m_szModuleName, ret, uid);
- return ret;
+ DBEVENTINFO dbei = {};
+ dbei.szModule = m_szModuleName;
+ dbei.timestamp = timestamp;
+ dbei.eventType = type;
+ dbei.cbBlob = (DWORD)mir_strlen(content) + 1;
+ dbei.pBlob = (BYTE *)content;
+ dbei.flags = flags;
+ dbei.szId = uid;
+ return db_event_add(hContact, &dbei);
}
void CSkypeProto::EditEvent(MCONTACT hContact, MEVENT hEvent, const char *szContent, time_t edit_time)
@@ -92,18 +97,6 @@ void CSkypeProto::EditEvent(MCONTACT hContact, MEVENT hEvent, const char *szCont
db_event_edit(hContact, hEvent, &dbei);
}
-MEVENT CSkypeProto::AddEventToDb(MCONTACT hContact, WORD type, DWORD timestamp, DWORD flags, DWORD cbBlob, PBYTE pBlob)
-{
- DBEVENTINFO dbei = {};
- dbei.szModule = m_szModuleName;
- dbei.timestamp = timestamp;
- dbei.eventType = type;
- dbei.cbBlob = cbBlob;
- dbei.pBlob = pBlob;
- dbei.flags = flags;
- return db_event_add(hContact, &dbei);
-}
-
void CSkypeProto::InitDBEvents()
{
db_set_resident(m_szModuleName, "LastAuthRequestTime");