From 5196be164550248b7f9cb0282a30e66846bfe9f1 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Fri, 20 Jan 2012 17:44:06 -0800 Subject: [PATCH] Properly report unknown command errors so the command line tool can give help. --- CallRPC.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CallRPC.cpp b/CallRPC.cpp index c2de5fd21..1e0b26707 100644 --- a/CallRPC.cpp +++ b/CallRPC.cpp @@ -78,6 +78,9 @@ int commandLineRPC(int argc, char *argv[]) Json::Value result=reply.get("result", Json::Value()); Json::Value error=reply.get("error", Json::Value()); + if(result.isString() && result.asString()=="unknown command") + nRet=1; + if(!error.isNull()) { // Error