diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-04-09 20:04:12 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-04-09 20:04:12 +0000 |
commit | 84261a1bda35dcdd1a4e56c3a573a169092f7363 (patch) | |
tree | 24031582c3cc692e87b2c33edc58862dc0be55e1 /protocols/SkypeWeb/src/skype_messages.cpp | |
parent | 5504428ab29cacbdc8bb7ca704e6108638bf4ecf (diff) |
SkypeWeb: attempt to speed up contact lookup
git-svn-id: http://svn.miranda-ng.org/main/trunk@12717 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_messages.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_messages.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp index eaffc50640..ae4d1ea513 100644 --- a/protocols/SkypeWeb/src/skype_messages.cpp +++ b/protocols/SkypeWeb/src/skype_messages.cpp @@ -1,6 +1,6 @@ #include "common.h"
-MEVENT CSkypeProto::GetMessageFromDB(MCONTACT hContact, const char *messageId, LONGLONG timestamp)
+MEVENT CSkypeProto::GetMessageFromDb(MCONTACT hContact, const char *messageId, LONGLONG timestamp)
{
mir_cslock lock(messageSyncLock);
@@ -32,7 +32,7 @@ MEVENT CSkypeProto::GetMessageFromDB(MCONTACT hContact, const char *messageId, L MEVENT CSkypeProto::AddMessageToDb(MCONTACT hContact, DWORD timestamp, DWORD flags, const char *messageId, char *content, int emoteOffset)
{
- if (MEVENT hDbEvent = GetMessageFromDB(hContact, messageId, timestamp))
+ if (MEVENT hDbEvent = GetMessageFromDb(hContact, messageId, timestamp))
return hDbEvent;
size_t messageLength = mir_strlen(&content[emoteOffset]) + 1;
size_t messageIdLength = mir_strlen(messageId);
@@ -240,17 +240,17 @@ void CSkypeProto::OnSyncHistory(const NETLIBHTTPREQUEST *response) if (lastMessage == NULL)
continue;
- ptrA clientMsgId(mir_t2a(ptrT(json_as_string(json_get(lastMessage, "clientmessageid")))));
- ptrA conversationLink(mir_t2a(ptrT(json_as_string(json_get(lastMessage, "conversationLink")))));
- LONGLONG composeTime(IsoToUnixTime(ptrT(json_as_string(json_get(lastMessage, "conversationLink")))));
+ char *clientMsgId = _T2A(json_as_string(json_get(lastMessage, "clientmessageid")));
+ char *conversationLink = _T2A(json_as_string(json_get(lastMessage, "conversationLink")));
+ time_t composeTime(IsoToUnixTime(ptrT(json_as_string(json_get(lastMessage, "conversationLink")))));
ptrA skypename(ContactUrlToName(conversationLink));
- if (skypename == NULL)
+ if (skypename == NULL)
return;
MCONTACT hContact = GetContact(skypename);
if (hContact == NULL && !IsMe(skypename))
hContact = AddContact(skypename, true);
- if (GetMessageFromDB(hContact, clientMsgId, composeTime) == NULL)
+ if (GetMessageFromDb(hContact, clientMsgId, composeTime) == NULL)
PushRequest(new GetHistoryRequest(ptrA(getStringA("registrationToken")), skypename, ptrA(getStringA("Server"))), &CSkypeProto::OnGetServerHistory);
}
}
\ No newline at end of file |