summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-08-01 12:26:05 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-08-01 12:26:05 +0000
commit23681d2dcf763b993b932451dea7a2772fca81ad (patch)
tree8cb5b3fd7b0bcb72794c07410f68fd9ef9d31c21 /protocols
parentae5f4d8c0289bb8e9ef15e03b0da5c31dabdf4c7 (diff)
SkypeWeb: crashfix
git-svn-id: http://svn.miranda-ng.org/main/trunk@14778 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/SkypeWeb/src/skype_contacts.cpp11
-rw-r--r--protocols/SkypeWeb/src/skype_proto.h2
-rw-r--r--protocols/SkypeWeb/src/skype_utils.cpp6
3 files changed, 12 insertions, 7 deletions
diff --git a/protocols/SkypeWeb/src/skype_contacts.cpp b/protocols/SkypeWeb/src/skype_contacts.cpp
index ba71ebc14f..9f5f7fe62d 100644
--- a/protocols/SkypeWeb/src/skype_contacts.cpp
+++ b/protocols/SkypeWeb/src/skype_contacts.cpp
@@ -287,7 +287,6 @@ void CSkypeProto::LoadContactList(const NETLIBHTTPREQUEST *response)
}
}
- ptrA token(getStringA("TokenSecret"));
if (skypenames.getCount() > 0)
{
int i = 0;
@@ -297,19 +296,17 @@ void CSkypeProto::LoadContactList(const NETLIBHTTPREQUEST *response)
for (; i < skypenames.getCount() && users.getCount() < 25; i++)
users.insert(skypenames[i]);
- PushRequest(new GetContactsInfoRequest(token, users), &CSkypeProto::LoadContactsInfo);
+ PushRequest(new GetContactsInfoRequest(m_szTokenSecret, users), &CSkypeProto::LoadContactsInfo);
- for (int j = 0; j < users.getCount(); j++)
- mir_free(users[j]);
+ FreeCharList(users);
users.destroy();
}
while(i < skypenames.getCount());
- for (i = 0; i < skypenames.getCount(); i++)
- mir_free(skypenames[i]);
+ FreeCharList(skypenames);
skypenames.destroy();
}
- PushRequest(new GetContactsAuthRequest(token), &CSkypeProto::LoadContactsAuth);
+ PushRequest(new GetContactsAuthRequest(m_szTokenSecret), &CSkypeProto::LoadContactsAuth);
}
INT_PTR CSkypeProto::OnRequestAuth(WPARAM hContact, LPARAM)
diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h
index 6c3bcaa669..01f3ec57bf 100644
--- a/protocols/SkypeWeb/src/skype_proto.h
+++ b/protocols/SkypeWeb/src/skype_proto.h
@@ -305,6 +305,8 @@ private:
void ProcessThreadUpdateRes(const JSONNode &node);
// utils
+ void CSkypeProto::FreeCharList(LIST<char> lst);
+
__forceinline bool IsOnline()
{ return (m_iStatus > ID_STATUS_OFFLINE && m_hPollingThread);
}
diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp
index e833592caf..e1bb16f064 100644
--- a/protocols/SkypeWeb/src/skype_utils.cpp
+++ b/protocols/SkypeWeb/src/skype_utils.cpp
@@ -19,6 +19,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma warning(disable:4566)
+void CSkypeProto::FreeCharList(LIST<char> lst)
+{
+ for (int i = 0; i < lst.getCount(); i++)
+ mir_free(lst[i]);
+}
+
void CSkypeProto::SetSrmmReadStatus(MCONTACT hContact)
{
time_t time = getDword(hContact, "LastMsgReadTime", 0);