From 3973fc0ef6292ab81d193a927f1e4cea4e447dfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sun, 20 Dec 2015 05:38:11 +0000 Subject: 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 --- protocols/Steam/src/steam_contacts.cpp | 8 ++++++-- protocols/Steam/src/steam_proto.cpp | 2 -- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'protocols/Steam') 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)); -- cgit v1.2.3