diff options
author | George Hazan <george.hazan@gmail.com> | 2013-05-09 13:55:21 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-05-09 13:55:21 +0000 |
commit | 61472e0fdc1fee81b75f7ffc22a82cb2541669ae (patch) | |
tree | 79251b3ef76ee9c48570d111151f151ec96cbb28 /protocols/Skype | |
parent | 2ec975899563178477a9fdf54b821ff7eab027e1 (diff) |
fix for receiving messages
git-svn-id: http://svn.miranda-ng.org/main/trunk@4607 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype')
-rw-r--r-- | protocols/Skype/src/skype_contacts.cpp | 2 | ||||
-rw-r--r-- | protocols/Skype/src/skype_database.cpp | 4 | ||||
-rw-r--r-- | protocols/Skype/src/skype_proto.cpp | 13 |
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; }
|