fix: wrong loop handling (return->continue)

This commit is contained in:
Tobias Reisinger 2019-07-29 12:12:31 +02:00
parent d1d1de221f
commit 0b8c755a6b

View file

@ -97,15 +97,13 @@ void controllers::post_discover(const HttpRequestPtr &req, std::function<void(co
std::ifstream answer_payload_stream(answer_payload); std::ifstream answer_payload_stream(answer_payload);
Json::CharReaderBuilder json_reader; Json::CharReaderBuilder json_reader;
std::string errs; std::string errors;
Json::Value client_info; Json::Value client_info;
if (!Json::parseFromStream(json_reader, answer_payload_stream, &client_info, &errs)) if (!Json::parseFromStream(json_reader, answer_payload_stream, &client_info, &errors))
{ {
// report to the user the failure and their locations in the document. LOG_ERROR << "Failed to parse configuration: " << errors;
std::cout << "Failed to parse configuration\n" continue;
<< errs;
return;
} }
free(answer_payload); free(answer_payload);