From 22afc8e67bade9d7abd6ff1bcf94db579ec18f26 Mon Sep 17 00:00:00 2001 From: electron128 Date: Sun, 31 Jan 2016 13:25:28 +0100 Subject: [PATCH] libresapi: fix empty peers list --- libresapi/src/api/PeersHandler.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libresapi/src/api/PeersHandler.cpp b/libresapi/src/api/PeersHandler.cpp index 9cdf29897..9894836e8 100644 --- a/libresapi/src/api/PeersHandler.cpp +++ b/libresapi/src/api/PeersHandler.cpp @@ -193,6 +193,8 @@ void PeersHandler::handleWildcard(Request &req, Response &resp) ok &= mRsPeers->getPeerDetails(*lit, details); detailsVec.push_back(details); } + // mark response as list, in case it is empty + resp.mDataStream.getStreamToMember(); for(std::list::iterator lit = identities.begin(); lit != identities.end(); ++lit) { // if no own ssl id is known, then hide the own id from the friendslist