X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fovsdb-idl.c;h=960e0866dc967c674c05a70344513e7199ea09a2;hb=cb4562170bdb37e1bb33f291a85fe275380af785;hp=7bbe6bf05feb6438220985a10116912726a3e5d4;hpb=979821c0a6b0c8a9f941a2e13c49feffe2391ab8;p=openvswitch diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index 7bbe6bf0..960e0866 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -799,7 +799,7 @@ next_real_row(struct ovsdb_idl_table *table, struct hmap_node *node) struct ovsdb_idl_row *row; row = CONTAINER_OF(node, struct ovsdb_idl_row, hmap_node); - if (!ovsdb_idl_row_is_orphan(row)) { + if (row->new || !ovsdb_idl_row_is_orphan(row)) { return row; } } @@ -1300,8 +1300,10 @@ ovsdb_idl_txn_verify(const struct ovsdb_idl_row *row_, } void -ovsdb_idl_txn_delete(struct ovsdb_idl_row *row) +ovsdb_idl_txn_delete(const struct ovsdb_idl_row *row_) { + struct ovsdb_idl_row *row = (struct ovsdb_idl_row *) row_; + assert(row->new != NULL); if (!row->old) { ovsdb_idl_row_clear_new(row); @@ -1319,7 +1321,7 @@ ovsdb_idl_txn_delete(struct ovsdb_idl_row *row) row->new = NULL; } -struct ovsdb_idl_row * +const struct ovsdb_idl_row * ovsdb_idl_txn_insert(struct ovsdb_idl_txn *txn, const struct ovsdb_idl_table_class *class) {