Don't return rpcSUCCESS.

This commit is contained in:
JoelKatz
2012-12-06 18:59:10 -08:00
parent 176efd4a8e
commit 2e425d60fd
3 changed files with 3 additions and 5 deletions

View File

@@ -58,7 +58,6 @@ Json::Value rpcError(int iError, Json::Value jvResult)
{ rpcSRC_ACT_MISSING, "srcActMissing", "Source account does not exist." }, { rpcSRC_ACT_MISSING, "srcActMissing", "Source account does not exist." },
{ rpcSRC_AMT_MALFORMED, "srcAmtMalformed", "Source amount/currency/issuer is malformed." }, { rpcSRC_AMT_MALFORMED, "srcAmtMalformed", "Source amount/currency/issuer is malformed." },
{ rpcSRC_UNCLAIMED, "srcUnclaimed", "Source account is not claimed." }, { rpcSRC_UNCLAIMED, "srcUnclaimed", "Source account is not claimed." },
{ rpcSUCCESS, "success", "Success." },
{ rpcTXN_NOT_FOUND, "txnNotFound", "Transaction not found." }, { rpcTXN_NOT_FOUND, "txnNotFound", "Transaction not found." },
{ rpcUNKNOWN_COMMAND, "unknownCmd", "Unknown command." }, { rpcUNKNOWN_COMMAND, "unknownCmd", "Unknown command." },
{ rpcWRONG_SEED, "wrongSeed", "The regular key does not point as the master key." }, { rpcWRONG_SEED, "wrongSeed", "The regular key does not point as the master key." },

View File

@@ -4,8 +4,7 @@
#include "../json/value.h" #include "../json/value.h"
enum { enum {
rpcSUCCESS, rpcSUCCESS = 0,
rpcBAD_SYNTAX, // Must be 1 to print usage to command line. rpcBAD_SYNTAX, // Must be 1 to print usage to command line.
rpcJSON_RPC, rpcJSON_RPC,

View File

@@ -1564,7 +1564,7 @@ Json::Value RPCHandler::doLogLevel(Json::Value jvRequest)
if (!jvRequest.isMember("partition")) if (!jvRequest.isMember("partition"))
{ // set base log severity { // set base log severity
Log::setMinSeverity(sv, true); Log::setMinSeverity(sv, true);
return rpcError(rpcSUCCESS); return Json::objectValue;
} }
// log_level partition severity base? // log_level partition severity base?
@@ -1576,7 +1576,7 @@ Json::Value RPCHandler::doLogLevel(Json::Value jvRequest)
else if (!LogPartition::setSeverity(partition, sv)) else if (!LogPartition::setSeverity(partition, sv))
return rpcError(rpcINVALID_PARAMS); return rpcError(rpcINVALID_PARAMS);
return rpcError(rpcSUCCESS); return Json::objectValue;
} }
return rpcError(rpcINVALID_PARAMS); return rpcError(rpcINVALID_PARAMS);