Commit c3f4368d authored by Daniel Salzman's avatar Daniel Salzman

confio: print error output if general conf-check error

parent 9ef275b6
......@@ -20,7 +20,7 @@
#include "knot/conf/confio.h"
#include "knot/conf/tools.h"
#define FCN(io) (io->fcn != NULL) ? io->fcn(io) : KNOT_EOK
#define FCN(io) (io->fcn != NULL) ? io->fcn(io) : io->error.code;
static void io_reset_val(
conf_io_t *io,
......@@ -1348,11 +1348,7 @@ static int check_section(
check_section_error:
io->error.str = args.err_str;
int ret = FCN(io);
if (ret == KNOT_EOK) {
return io->error.code;
}
return ret;
return FCN(io);
}
static int check_iter_section(
......
......@@ -1399,9 +1399,8 @@ static int ctl_conf_txn(ctl_args_t *args, ctl_cmd_t cmd)
// First check the database.
ret = conf_io_check(&io);
if (ret != KNOT_EOK) {
// Error response is already sent by the check function.
// No transaction abort!
return KNOT_EOK;
break;
}
ret = conf_io_commit(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment