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;
}
const char *record_id, bool must_exist,
const struct ovsdb_idl_row **);
-void ctl_set_column(const char *table_name,
- const struct ovsdb_idl_row *, const char *arg,
- struct ovsdb_symbol_table *);
+char *ctl_set_column(const char *table_name, const struct ovsdb_idl_row *,
+ const char *arg, struct ovsdb_symbol_table *);
#endif /* db-ctl-base.h */
nbrec_logical_router_port_set_networks(lrp, networks, n_networks);
for (int i = 0; i < n_settings; i++) {
- ctl_set_column("Logical_Router_Port", &lrp->header_, settings[i],
- ctx->symtab);
+ char *error = ctl_set_column("Logical_Router_Port", &lrp->header_,
+ settings[i], ctx->symtab);
+ if (error) {
+ ctl_fatal("%s", error);
+ }
}
/* Insert the logical port into the logical router. */
}
for (i = 0; i < n_settings; i++) {
- ctl_set_column("Port", &port->header_, settings[i],
- ctx->symtab);
+ char *error = ctl_set_column("Port", &port->header_, settings[i],
+ ctx->symtab);
+ if (error) {
+ ctl_fatal("%s", error);
+ }
}
bridge_insert_port((bridge->parent ? bridge->parent->br_cfg