diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-05-05 12:51:06 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-05-05 12:51:06 +0000 |
commit | 81e0419a0c18dd5a07a68ecac2e1fc6058bcea00 (patch) | |
tree | 63fc70d03799b8b76e0efdd5ed682ebb8fc7650a /protocols/SkypeWeb/src/skype_history_sync.cpp | |
parent | 49b0ad7d704b422b436c3752be331b73591f7a1e (diff) |
SkypeWeb: TRouter errors handling. Other fixes.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13440 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_history_sync.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_history_sync.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/protocols/SkypeWeb/src/skype_history_sync.cpp b/protocols/SkypeWeb/src/skype_history_sync.cpp index 98b10b9a38..80155e1c88 100644 --- a/protocols/SkypeWeb/src/skype_history_sync.cpp +++ b/protocols/SkypeWeb/src/skype_history_sync.cpp @@ -197,6 +197,7 @@ void CSkypeProto::OnSyncHistory(const NETLIBHTTPREQUEST *response) if (response == NULL)
return;
JSONROOT root(response->pData);
+
if (root == NULL)
return;
@@ -209,6 +210,7 @@ void CSkypeProto::OnSyncHistory(const NETLIBHTTPREQUEST *response) if (totalCount >= 99 || json_size(conversations) >= 99)
PushRequest(new SyncHistoryFirstRequest(syncState, RegToken), &CSkypeProto::OnSyncHistory);
+ bool autoSyncEnabled = getByte("AutoSync", 1);
for (size_t i = 0; i < json_size(conversations); i++)
{
@@ -228,12 +230,14 @@ void CSkypeProto::OnSyncHistory(const NETLIBHTTPREQUEST *response) if (conversationLink != NULL && strstr(conversationLink, "/8:"))
{
- if (!getByte("AutoSync", 1)) continue;
- skypename = ContactUrlToName(conversationLink);
- MCONTACT hContact = AddContact(skypename, true);
+ if (autoSyncEnabled)
+ {
+ skypename = ContactUrlToName(conversationLink);
+ MCONTACT hContact = AddContact(skypename, true);
- if (GetMessageFromDb(hContact, clientMsgId, composeTime) == NULL)
- PushRequest(new GetHistoryRequest(RegToken, skypename, 100, false, 0, Server), &CSkypeProto::OnGetServerHistory);
+ if (GetMessageFromDb(hContact, clientMsgId, composeTime) == NULL)
+ PushRequest(new GetHistoryRequest(RegToken, skypename, 100, false, 0, Server), &CSkypeProto::OnGetServerHistory);
+ }
}
else if (conversationLink != NULL && strstr(conversationLink, "/19:"))
{
|