summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_messages.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-05-01 17:30:38 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-05-01 17:30:38 +0000
commit835dab85f2585c4c3fda5e4d21384aa19edb8104 (patch)
treee67cc3c62049b181e4604bb6eecc9fc3d7c86cfe /protocols/SkypeWeb/src/skype_messages.cpp
parentb9852a65f0facc5c2e7239f4751050f12bc15a4d (diff)
SkypeWeb: Optimizations.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13338 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_messages.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_messages.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp
index 1e32973535..d259963bc3 100644
--- a/protocols/SkypeWeb/src/skype_messages.cpp
+++ b/protocols/SkypeWeb/src/skype_messages.cpp
@@ -66,13 +66,15 @@ MEVENT CSkypeProto::AddMessageToDb(MCONTACT hContact, DWORD timestamp, DWORD fla
return AddEventToDb(hContact, emoteOffset == 0 ? EVENTTYPE_MESSAGE : SKYPE_DB_EVENT_TYPE_ACTION, timestamp, flags, (DWORD)cbBlob, pBlob);
}
-MEVENT CSkypeProto::AddCallToDb(MCONTACT hContact, DWORD timestamp, DWORD flags)
+MEVENT CSkypeProto::AddCallToDb(MCONTACT hContact, DWORD timestamp, DWORD flags, const char *callId)
{
const char *message = Translate("Incoming call");
+ size_t callIdLength = mir_strlen(callId);
size_t messageLength = mir_strlen(message);
- size_t cbBlob = messageLength;
+ size_t cbBlob = messageLength + callIdLength;
PBYTE pBlob = (PBYTE)mir_alloc(cbBlob);
memcpy(pBlob, message, messageLength);
+ memcpy(pBlob + messageLength, callId, callIdLength);
return AddEventToDb(hContact, SKYPE_DB_EVENT_TYPE_INCOMING_CALL, timestamp, flags, (DWORD)cbBlob, pBlob);
}