diff options
author | Daniel Willmann <daniel@totalueberwachung.de> | 2011-07-28 21:38:51 +0200 |
---|---|---|
committer | Daniel Willmann <daniel@totalueberwachung.de> | 2011-08-22 19:24:34 +0200 |
commit | c61beefa50a5089cb72254e12ca5b79e884987f0 (patch) | |
tree | 1a0030a509d5d7ad93a0025c76e1b614722c10c1 /openbsc | |
parent | 691a68926d88c890c71d299e16ef3ef7f6b7869e (diff) |
libctrl: Don't overwrite error reply if the verify function sets one
Diffstat (limited to 'openbsc')
-rw-r--r-- | openbsc/src/libctrl/control_cmd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/openbsc/src/libctrl/control_cmd.c b/openbsc/src/libctrl/control_cmd.c index 818c0d570..7a75e0e22 100644 --- a/openbsc/src/libctrl/control_cmd.c +++ b/openbsc/src/libctrl/control_cmd.c @@ -137,7 +137,9 @@ int ctrl_cmd_exec(vector vline, struct ctrl_cmd *command, vector node, void *dat if (cmd_el->verify) { if ((ret = cmd_el->verify(command, command->value, data))) { ret = CTRL_CMD_ERROR; - command->reply = "Value failed verification."; + /* If verify() set an appropriate error message, don't change it. */ + if (!command->reply) + command->reply = "Value failed verification."; goto out; } } else if (cmd_el->param) { |