2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 22:35:15 +00:00

db-ctl-base: Don't die in ctl_set_column() on error.

Return the error message to the caller instead of reporting it and dying
so that the caller can handle the error without terminating the process
if needed.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Jakub Sitnicki
2018-07-02 12:50:09 +02:00
committed by Ben Pfaff
parent 0e8e4c8f8d
commit fd26f9a2bd
4 changed files with 26 additions and 12 deletions

View File

@@ -2395,12 +2395,21 @@ ctl_context_done(struct ctl_context *ctx,
invalidate_cache(ctx);
}
void ctl_set_column(const char *table_name,
const struct ovsdb_idl_row *row, const char *arg,
struct ovsdb_symbol_table *symtab)
char * OVS_WARN_UNUSED_RESULT
ctl_set_column(const char *table_name, const struct ovsdb_idl_row *row,
const char *arg, struct ovsdb_symbol_table *symtab)
{
const struct ovsdb_idl_table_class *table;
char *error;
die_if_error(get_table(table_name, &table));
die_if_error(set_column(table, row, arg, symtab));
error = get_table(table_name, &table);
if (error) {
return error;
}
error = set_column(table, row, arg, symtab);
if (error) {
return error;
}
return NULL;
}