From ca3873bd79ab59865f1cbf4a00a51917f8c6af21 Mon Sep 17 00:00:00 2001 From: cxl Date: Wed, 18 Jul 2012 09:51:47 +0000 Subject: [PATCH] *Core/Rpc: Fixed fault reporting in JsonRpc git-svn-id: svn://ultimatepp.org/upp/trunk@5214 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/Rpc/Server.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uppsrc/Core/Rpc/Server.cpp b/uppsrc/Core/Rpc/Server.cpp index 159370295..5f60b59a9 100644 --- a/uppsrc/Core/Rpc/Server.cpp +++ b/uppsrc/Core/Rpc/Server.cpp @@ -176,13 +176,13 @@ Value ProcessJsonRpc(const Value& v, const char *group, const char *peeraddr) LLOG("Processing error: " << e.text); if(rpc_trace) *rpc_trace << "Processing error: " << e.text << '\n'; - return AsJSON(JsonRpcError(e.code, e.text, id)); + return JsonRpcError(e.code, e.text, id); } catch(ValueTypeMismatch) { LLOG("ValueTypeMismatch at parameter " << data.ii); if(rpc_trace) *rpc_trace << "ValueTypeMismatch at parameter " << data.ii << '\n'; - return AsJSON(JsonRpcError(RPC_SERVER_PARAM_ERROR, "Invalid params", id)); + return JsonRpcError(RPC_SERVER_PARAM_ERROR, "Invalid params", id); } } @@ -251,7 +251,7 @@ bool RpcPerform(TcpSocket& http, const char *group) response << "HTTP/1.0 200 OK\r\n" "Date: " << ts << "\r\n" - "Server: U++ XMLRPC server\r\n" + "Server: U++ RPC server\r\n" "Content-Length: " << r.GetCount() << "\r\n" "Connection: close\r\n" "Content-Type: text/" << (json ? "json" : "xml") << "\r\n\r\n"