diff options
Diffstat (limited to 'protocols/Steam/src')
-rw-r--r-- | protocols/Steam/src/steam_contacts.cpp | 10 | ||||
-rw-r--r-- | protocols/Steam/src/steam_login.cpp | 9 |
2 files changed, 14 insertions, 5 deletions
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp index 85c2dc2fd6..03acc8a65f 100644 --- a/protocols/Steam/src/steam_contacts.cpp +++ b/protocols/Steam/src/steam_contacts.cpp @@ -112,7 +112,7 @@ void CSteamProto::UpdateContact(MCONTACT hContact, JSONNode *data) node = json_get(data, "realname"); if (node != NULL) { - std::wstring realname = ptrT(json_as_string(node)); + std::wstring realname = (TCHAR*)ptrT(json_as_string(node)); if (!realname.empty()) { size_t pos = realname.find(L' ', 1); @@ -137,7 +137,7 @@ void CSteamProto::UpdateContact(MCONTACT hContact, JSONNode *data) // avatar bool biggerAvatars = getBool("UseBigAvatars", false); node = json_get(data, biggerAvatars ? "avatarfull" : "avatarmedium"); - std::string avatarUrl = _T2A(ptrT(json_as_string(node))); + std::string avatarUrl = (char*)_T2A(ptrT(json_as_string(node))); CheckAvatarChange(hContact, avatarUrl); // set country @@ -364,7 +364,7 @@ void CSteamProto::OnGotFriendList(const NETLIBHTTPREQUEST *response) if (root == NULL) return; - std::string steamIds = ptrA(getStringA("SteamID")); + std::string steamIds = (char*)ptrA(getStringA("SteamID")); std::map<std::string, JSONNode*> friends; @@ -383,7 +383,7 @@ void CSteamProto::OnGotFriendList(const NETLIBHTTPREQUEST *response) if (node == NULL) continue; - std::string steamId = _T2A(ptrT(json_as_string(node))); + std::string steamId = (char*)_T2A(ptrT(json_as_string(node))); friends.insert(std::make_pair(steamId, child)); } } @@ -725,7 +725,7 @@ void CSteamProto::OnSearchByIdEnded(const NETLIBHTTPREQUEST *response, void *arg node = json_get(nroot, "realname"); if (node != NULL) { - std::wstring realname = ptrT(json_as_string(node)); + std::wstring realname = (TCHAR*)ptrT(json_as_string(node)); if (!realname.empty()) { size_t pos = realname.find(' ', 1); diff --git a/protocols/Steam/src/steam_login.cpp b/protocols/Steam/src/steam_login.cpp index 3b209d97de..771051a68b 100644 --- a/protocols/Steam/src/steam_login.cpp +++ b/protocols/Steam/src/steam_login.cpp @@ -19,6 +19,9 @@ void CSteamProto::OnGotRsaKey(const NETLIBHTTPREQUEST *response) if (!response)
return;
+ if (!response->pData)
+ return;
+
// load rsa key parts
JSONNode root = JSONNode::parse(response->pData);
if (!root)
@@ -81,6 +84,12 @@ void CSteamProto::OnAuthorization(const NETLIBHTTPREQUEST *response) return;
}
+ if (!response->pData)
+ {
+ SetStatus(ID_STATUS_OFFLINE);
+ return;
+ }
+
JSONNode root = JSONNode::parse(response->pData);
if (!root)
{
|