From 92a70c7ef430c2fbbbee1a17bb9fcb39f22bd42b Mon Sep 17 00:00:00 2001 From: cxl Date: Fri, 20 Nov 2015 11:35:29 +0000 Subject: [PATCH] Core/RPC: Fixed issue with JsonRPC null Date git-svn-id: svn://ultimatepp.org/upp/trunk@9197 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/JSON.cpp | 2 +- uppsrc/Core/Rpc/imp/Client.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/uppsrc/Core/JSON.cpp b/uppsrc/Core/JSON.cpp index 3e5cc2f0c..f44469efa 100644 --- a/uppsrc/Core/JSON.cpp +++ b/uppsrc/Core/JSON.cpp @@ -46,7 +46,7 @@ Value ParseJSON(CParser& p) break; p.PassChar(','); } - return va; + return va; } p.ThrowError("Unrecognized JSON element"); return Null; diff --git a/uppsrc/Core/Rpc/imp/Client.cpp b/uppsrc/Core/Rpc/imp/Client.cpp index b17b0d3fb..60118d41a 100644 --- a/uppsrc/Core/Rpc/imp/Client.cpp +++ b/uppsrc/Core/Rpc/imp/Client.cpp @@ -70,7 +70,7 @@ RpcGet RpcRequest::Retry() Value JsonRpcData(const Value& v) { - if(IsDateTime(v)) + if(IsDateTime(v) && !IsNull(v)) return FormatIso8601(v); return v; } @@ -128,7 +128,7 @@ RpcGet RpcRequest::Execute() } String response; New(); - if(shorted) + if(shorted) response = RpcExecute(request, "", "127.0.0.1"); else response = Post(request).Execute();