summaryrefslogtreecommitdiff
path: root/protocols/Skype/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Skype/src')
-rw-r--r--protocols/Skype/src/skype_contacts.cpp2
-rw-r--r--protocols/Skype/src/skype_database.cpp4
-rw-r--r--protocols/Skype/src/skype_proto.cpp13
3 files changed, 7 insertions, 12 deletions
diff --git a/protocols/Skype/src/skype_contacts.cpp b/protocols/Skype/src/skype_contacts.cpp
index 7c442ea5e6..041f76eaa2 100644
--- a/protocols/Skype/src/skype_contacts.cpp
+++ b/protocols/Skype/src/skype_contacts.cpp
@@ -291,7 +291,7 @@ void __cdecl CSkypeProto::LoadChatList(void*)
{
this->Log(L"Updating group chats list");
CConversation::Refs conversations;
- g_skype->GetConversationList(conversations);
+ g_skype->GetConversationList(conversations);
for (uint i = 0; i < conversations.size(); i++)
{
diff --git a/protocols/Skype/src/skype_database.cpp b/protocols/Skype/src/skype_database.cpp
index bbc11cb385..2b6c6b1292 100644
--- a/protocols/Skype/src/skype_database.cpp
+++ b/protocols/Skype/src/skype_database.cpp
@@ -27,15 +27,13 @@ bool CSkypeProto::IsMessageInDB(HANDLE hContact, DWORD timestamp, SEBinary &guid
HANDLE CSkypeProto::AddDBEvent(HANDLE hContact, WORD type, DWORD timestamp, DWORD flags, DWORD cbBlob, PBYTE pBlob)
{
- DBEVENTINFO dbei = { 0 };
- dbei.cbSize = sizeof(dbei);
+ DBEVENTINFO dbei = { sizeof(dbei) };
dbei.szModule = this->m_szModuleName;
dbei.timestamp = timestamp;
dbei.eventType = type;
dbei.cbBlob = cbBlob;
dbei.pBlob = pBlob;
dbei.flags = flags;
-
return ::db_event_add(hContact, &dbei);
}
diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp
index a8b1c0a315..687ccbf222 100644
--- a/protocols/Skype/src/skype_proto.cpp
+++ b/protocols/Skype/src/skype_proto.cpp
@@ -282,24 +282,21 @@ int __cdecl CSkypeProto::RecvMsg(HANDLE hContact, PROTORECVEVENT* pre)
::db_unset(hContact, "CList", "Hidden");
this->UserIsTyping(hContact, PROTOTYPE_SELFTYPING_OFF);
- char *guid = (char *)pre->lParam;
- int guidLen = (int)::strlen(guid);
+ SEBinary *guid = (SEBinary*)pre->lParam;
char *message = (char *)pre->szMessage;
- int msgLen = (int)::strlen(message) + 1;
+ size_t msgLen = ::strlen(message) + 1;
- message = (char *)::mir_realloc(message, msgLen + guidLen);
- ::memcpy((char *)&message[msgLen], guid, guidLen);
+ message = (char *)::mir_realloc(message, msgLen + guid->size());
+ ::memcpy((char *)&message[msgLen], guid->data(), guid->size());
return (INT_PTR)this->AddDBEvent(
hContact,
EVENTTYPE_MESSAGE,
pre->timestamp,
DBEF_UTF | ((pre->flags & PREF_CREATEREAD) ? DBEF_READ : 0),
- msgLen + guidLen,
+ DWORD(msgLen + guid->size()),
(PBYTE)message);
-
- //return ::Proto_RecvMessage(hContact, pre);
}
int __cdecl CSkypeProto::RecvUrl(HANDLE hContact, PROTORECVEVENT *) { return 0; }