diff options
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
{
|