From 71c34ed4e01c7ebe31b619b770dda749cbb3911d Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Fri, 31 Oct 2014 12:43:12 -0700 Subject: [PATCH] Remove unused ErrorReply function --- src/ripple/net/impl/RPCUtil.cpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/ripple/net/impl/RPCUtil.cpp b/src/ripple/net/impl/RPCUtil.cpp index e10dc3336..ed14924b1 100644 --- a/src/ripple/net/impl/RPCUtil.cpp +++ b/src/ripple/net/impl/RPCUtil.cpp @@ -312,17 +312,4 @@ std::string JSONRPCReply (Json::Value const& result, Json::Value const& error, J return to_string (reply) + "\n"; } -void ErrorReply (std::ostream& stream, Json::Value const& objError, Json::Value const& id) -{ - // Send error reply from json-rpc error object - int nStatus = 500; - int code = objError[jss::code].asInt (); - - if (code == -32600) nStatus = 400; - else if (code == -32601) nStatus = 404; - - std::string strReply = JSONRPCReply (Json::Value (), objError, id); - stream << HTTPReply (nStatus, strReply) << std::flush; -} - } // ripple