2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

ovsdb-idl: Update IDL data when "set" functions are called.

Until now, the "set" functions generated by the IDL updated the data in the
database (during commit) but not the data exposed by the IDL in its data
structures.  This was just an oversight, so this commit causes the data
exposed by IDL to be updated also.
This commit is contained in:
Ben Pfaff
2009-12-08 09:48:37 -08:00
parent 475281c01b
commit 8bc915de7a
3 changed files with 28 additions and 15 deletions

View File

@@ -212,6 +212,7 @@ ovsdb_idl_run(struct ovsdb_idl *idl)
{
int i;
assert(!idl->txn);
jsonrpc_session_run(idl->session);
for (i = 0; jsonrpc_session_is_connected(idl->session) && i < 50; i++) {
struct jsonrpc_msg *msg, *reply;
@@ -889,6 +890,11 @@ ovsdb_idl_txn_disassemble(struct ovsdb_idl_txn *txn)
HMAP_FOR_EACH_SAFE (row, next, struct ovsdb_idl_row, txn_node,
&txn->txn_rows) {
if (row->old && row->written) {
(row->table->class->unparse)(row);
ovsdb_idl_row_clear_arcs(row, false);
(row->table->class->parse)(row);
}
ovsdb_idl_row_clear_new(row);
free(row->prereqs);