d_controller uses COMMAND_SUCCESS and COMMAND_ERROR instead of CONTROL_RESULT_SUCCESS and CONTROL_RESULT_ERROR
there are 2 defines used for createAnswer function, currently both have same values, but code should be cleaned up to use only one definition
d_process.h:
/// @brief Returned by the process to indicate a command was successful.
static const int COMMAND_SUCCESS = 0;
/// @brief Returned by the process to indicates a command failed.
static const int COMMAND_ERROR = 1;
/// @brief Returned by the process to indicates a command is not valid.
static const int COMMAND_INVALID = 2;
command_interpreter.h
/// @brief Status code indicating a successful operation
const int CONTROL_RESULT_SUCCESS = 0;
/// @brief Status code indicating a general failure
const int CONTROL_RESULT_ERROR = 1;
/// @brief Status code indicating that the specified command is not supported.
const int CONTROL_RESULT_COMMAND_UNSUPPORTED = 2;
/// @brief Status code indicating that the specified command was completed
/// correctly, but failed to produce any results. For example, get
/// completed the search, but couldn't find the object it was looking for.
const int CONTROL_RESULT_EMPTY = 3;
/// @brief Status code indicating that the command was unsuccessful due to a
/// conflict between the command arguments and the server state. For example,
/// a lease4-add fails when the subnet identifier in the command does not
/// match the subnet identifier in the server configuration.
const int CONTROL_RESULT_CONFLICT = 4;
only in d_controller.cc the COMMAND_SUCCESS and COMMAND_ERROR are used (COMMAND_INVALID not used anywhere):
./src/lib/process/d_controller.cc: ConstElementPtr error = createAnswer(COMMAND_ERROR,
./src/lib/process/d_controller.cc: return (createAnswer(COMMAND_SUCCESS, config));
./src/lib/process/d_controller.cc: return (createAnswer(COMMAND_ERROR, "Argument must be a map"));
./src/lib/process/d_controller.cc: return (createAnswer(COMMAND_ERROR,
./src/lib/process/d_controller.cc: return (createAnswer(COMMAND_ERROR,
./src/lib/process/d_controller.cc: return (createAnswer(COMMAND_ERROR,
./src/lib/process/d_controller.cc: return (createAnswer(COMMAND_ERROR,
./src/lib/process/d_controller.cc: ConstElementPtr error = createAnswer(COMMAND_ERROR,
./src/lib/process/d_controller.cc: return (createAnswer(COMMAND_SUCCESS, response));
./src/lib/process/d_controller.cc: return (createAnswer(COMMAND_SUCCESS, status));
./src/lib/process/d_controller.cc: answer = createAnswer(COMMAND_SUCCESS, getVersion(false), arguments);
./src/lib/process/d_controller.cc: return (createAnswer(COMMAND_SUCCESS, isc::detail::getConfigReport()));
./src/lib/process/d_controller.cc: return (createAnswer(COMMAND_SUCCESS, "Process has not been initialized"));