summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
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);