summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_database.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2013-04-26 19:41:06 +0000
committerAlexander Lantsev <aunsane@gmail.com>2013-04-26 19:41:06 +0000
commitbed36b071fe082d34e5961bb5105e662f17aa7c6 (patch)
tree2b83b5c433675fa81c316fb336cd0377a5953ecd /protocols/Skype/src/skype_database.cpp
parenta3422fd14b9201e7bfc6ecb28df71ed68c39c228 (diff)
- sync was returned
- fixed contacts nick updating - fixed eternal "connecting" git-svn-id: http://svn.miranda-ng.org/main/trunk@4539 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_database.cpp')
-rw-r--r--protocols/Skype/src/skype_database.cpp36
1 files changed, 8 insertions, 28 deletions
diff --git a/protocols/Skype/src/skype_database.cpp b/protocols/Skype/src/skype_database.cpp
index 4eb92678d7..258b629781 100644
--- a/protocols/Skype/src/skype_database.cpp
+++ b/protocols/Skype/src/skype_database.cpp
@@ -12,11 +12,11 @@ bool CSkypeProto::IsMessageInDB(HANDLE hContact, DWORD timestamp, const char* gu
dbei.pBlob = (PBYTE)::mir_alloc(dbei.cbBlob);
::db_event_get(hDbEvent, &dbei);
- /*if (dbei.timestamp < timestamp)
+ if (dbei.timestamp < timestamp)
{
::mir_free(dbei.pBlob);
break;
- }*/
+ }
int sendFlag = dbei.flags & DBEF_SENT;
if (dbei.eventType == EVENTTYPE_MESSAGE && sendFlag == flag)
@@ -93,9 +93,9 @@ void CSkypeProto::RaiseAuthRequestEvent(DWORD timestamp, CContact::Ref contact)
void CSkypeProto::RaiseMessageReceivedEvent(HANDLE hContact, DWORD timestamp, const char *guid, const wchar_t *message, bool isNeedCheck)
{
- //if (isNeedCheck)
- // if (this->IsMessageInDB(hContact, timestamp, guid))
- // return;
+ if (isNeedCheck)
+ if (this->IsMessageInDB(hContact, timestamp, guid))
+ return;
PROTORECVEVENT recv;
recv.flags = PREF_UTF;
@@ -108,8 +108,8 @@ void CSkypeProto::RaiseMessageReceivedEvent(HANDLE hContact, DWORD timestamp, co
void CSkypeProto::RaiseMessageSendedEvent(HANDLE hContact, DWORD timestamp, const char *guid, const wchar_t *message)
{
- //if (this->IsMessageInDB(hContact, timestamp, guid, DBEF_SENT))
- // return;
+ if (this->IsMessageInDB(hContact, timestamp, guid, DBEF_SENT))
+ return;
char *msg = ::mir_utf8encodeW(message);
@@ -123,24 +123,4 @@ void CSkypeProto::RaiseMessageSendedEvent(HANDLE hContact, DWORD timestamp, cons
dbei.flags = PREF_UTF | DBEF_SENT;
::db_event_add(hContact, &dbei);
-}
-
-//void CSkypeProto::RaiseFileReceivedEvent(
-// DWORD timestamp,
-// const char* sid,
-// const char* nick,
-// const char* message)
-//{
-// PROTORECVFILET pre = {0};
-//
-// CCSDATA ccs = {0};
-// ccs.szProtoService = PSR_FILE;
-// ccs.hContact = this->AddContactBySid(sid, nick);
-// ccs.wParam = 0;
-// ccs.lParam = (LPARAM)&pre;
-// pre.flags = PREF_UTF;
-// pre.timestamp = timestamp;
-// //pre.szMessage = (char *)message;
-//
-// ::CallService(MS_PROTO_CHAINRECV, 0, (LPARAM)&ccs);
-//} \ No newline at end of file
+} \ No newline at end of file