diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-08-12 19:42:03 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-08-12 19:42:03 +0000 |
commit | 760ba928ec85e2a77071b677cba6a72b0f3b5ea9 (patch) | |
tree | c42b039b68088ef2fca15114d1dc9cd59d4d5911 /protocols/SkypeWeb/src/skype_avatars.cpp | |
parent | f3921cdd1cdf9675ded1347eca3d49e48aa4707a (diff) |
SkypeWeb: code clenup
git-svn-id: http://svn.miranda-ng.org/main/trunk@14929 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_avatars.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_avatars.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/protocols/SkypeWeb/src/skype_avatars.cpp b/protocols/SkypeWeb/src/skype_avatars.cpp index 254f64c757..7410ad7ab7 100644 --- a/protocols/SkypeWeb/src/skype_avatars.cpp +++ b/protocols/SkypeWeb/src/skype_avatars.cpp @@ -39,7 +39,6 @@ INT_PTR CSkypeProto::SvcGetAvatarCaps(WPARAM wParam, LPARAM lParam) case AF_FETCHIFCONTACTOFFLINE:
return 1;
}
-
return 0;
}
@@ -194,21 +193,16 @@ INT_PTR CSkypeProto::SvcSetMyAvatar(WPARAM, LPARAM lParam) }
rewind(hFile);
- char *data = (char*)mir_alloc(length);
- if (fread(data, sizeof(char), length, hFile) != length)
+ ptrA data((char*)mir_alloc(length));
+
+ if (data == NULL || fread(data, sizeof(char), length, hFile) != length)
{
debugLogA("CSkypeProto::SvcSetMyAvatar: failed to read avatar file");
- mir_free(data);
fclose(hFile);
return -1;
}
fclose(hFile);
-
- ptrA token(getStringA("TokenSecret"));
- ptrA skypename(getStringA(SKYPE_SETTINGS_ID));
- PushRequest(new SetAvatarRequest(token, skypename, data, length), &CSkypeProto::OnSentAvatar);
-
- mir_free(data);
+ PushRequest(new SetAvatarRequest(m_szTokenSecret, m_szSelfSkypeName, data, length), &CSkypeProto::OnSentAvatar);
}
else
{
|