mirror of https://gerrit.osmocom.org/libosmocore
libctrl: Don't overwrite error reply if the verify function sets one
This commit is contained in:
parent
f7c74e5879
commit
9225ab1ecc
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue