Browse Source

Make i2pcontrol error codes negative.

pull/242/head
EinMByte 9 years ago
parent
commit
c10d0fdb7e
  1. 2
      i2pcontrol/I2PControl.cpp

2
i2pcontrol/I2PControl.cpp

@ -39,7 +39,7 @@ std::string I2PControlSession::Response::toJsonString() const @@ -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();

Loading…
Cancel
Save