return 200 instead of 404 when test is fetched

This commit is contained in:
Adam Ierymenko 2016-02-04 16:27:25 -08:00
parent dc3d899e70
commit 69b1da2e1d

View File

@ -1312,7 +1312,7 @@ unsigned int SqliteNetworkController::_doCPGet(
} else if ((path[2] == "test")&&(path.size() >= 4)) {
std::map< uint64_t,_CircuitTestEntry >::iterator cte(_circuitTests.find(Utils::hexStrToU64(path[3].c_str())));
if (cte != _circuitTests.end()) {
if ((cte != _circuitTests.end())&&(cte->second.test)) {
responseBody = "[";
responseBody.append(cte->second.jsonResults);
@ -1323,6 +1323,8 @@ unsigned int SqliteNetworkController::_doCPGet(
::free((void *)cte->second.test);
_circuitTests.erase(cte);
return 200;
} // else 404
} // else 404