Make i2pcontrol error codes negative.

This commit is contained in:
EinMByte 2015-08-02 17:02:53 +02:00
parent 833a606b13
commit c10d0fdb7e

View File

@ -39,7 +39,7 @@ std::string I2PControlSession::Response::toJsonString() const
}
oss << "},\"jsonrpc\":\"" << version << '"';
if(error != ErrorCode::None)
oss << ",\"error\":{\"code\":" << static_cast<int>(error)
oss << ",\"error\":{\"code\":" << -static_cast<int>(error)
<< ",\"message\":\"" << getErrorMsg() << "\"" << "}";
oss << "}";
return oss.str();