summaryrefslogtreecommitdiff
path: root/protocols/Steam/src
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2015-12-20 05:38:11 +0000
committerRobert Pösel <robyer@seznam.cz>2015-12-20 05:38:11 +0000
commit3973fc0ef6292ab81d193a927f1e4cea4e447dfd (patch)
tree33f6aa9122dc8505e1b1885b0c4b1714a36430c6 /protocols/Steam/src
parent1c476a60f4c9e5afcf22417fc720a91c5b0a887b (diff)
Steam: Fix finishing searching by id when we found no results
git-svn-id: http://svn.miranda-ng.org/main/trunk@15907 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam/src')
-rw-r--r--protocols/Steam/src/steam_contacts.cpp8
-rw-r--r--protocols/Steam/src/steam_proto.cpp2
2 files changed, 6 insertions, 4 deletions
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp
index 13e9a522c5..9026c9e17b 100644
--- a/protocols/Steam/src/steam_contacts.cpp
+++ b/protocols/Steam/src/steam_contacts.cpp
@@ -706,13 +706,16 @@ void CSteamProto::OnSearchByIdEnded(const HttpResponse *response, void *arg)
if (!ResponseHttpOk(response))
{
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_FAILED, (HANDLE)STEAM_SEARCH_BYID, 0);
- debugLogA("CSteamProto::OnSearchByIdEnded: failed to get summaries for %s", (char*)arg);
+ debugLog(_T("CSteamProto::OnSearchByIdEnded: failed to get summaries for %s"), (TCHAR*)arg);
return;
}
JSONROOT root(response->pData);
if (root == NULL)
+ {
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_FAILED, (HANDLE)STEAM_SEARCH_BYID, 0);
return;
+ }
JSONNode *node = json_get(root, "players");
JSONNode *nodes = json_as_array(node);
@@ -750,9 +753,10 @@ void CSteamProto::OnSearchByIdEnded(const HttpResponse *response, void *arg)
ssr.data = json_copy(nroot);
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)STEAM_SEARCH_BYID, (LPARAM)&ssr);
- ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)STEAM_SEARCH_BYID, 0);
}
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)STEAM_SEARCH_BYID, 0);
+
json_delete(nodes);
}
diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp
index 0fdbd61995..4d6da4e763 100644
--- a/protocols/Steam/src/steam_proto.cpp
+++ b/protocols/Steam/src/steam_proto.cpp
@@ -226,8 +226,6 @@ HANDLE CSteamProto::SearchBasic(const TCHAR* id)
if (!this->IsOnline())
return 0;
- //ForkThread(&CSteamProto::SearchByIdThread, mir_wstrdup(id));
-
ptrA token(getStringA("TokenSecret"));
ptrA steamId(mir_t2a(id));