[ovs-dev] [bugfixes 3/4] ovsdb-idl: Check prerequisites for ovsdb_idl_txn_verify() also.
Ben Pfaff
blp at nicira.com
Wed Dec 8 23:22:45 UTC 2010
The IDL can only verify prerequisites for columns that it is monitoring,
but it didn't check for that. This assertion (which is the same as one in
ovsdb_idl_txn_write()) should alert us to such problems.
This would have found the problem fixed by the previous commit.
---
lib/ovsdb-idl.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c
index 448f9c9..df5aff5 100644
--- a/lib/ovsdb-idl.c
+++ b/lib/ovsdb-idl.c
@@ -1693,6 +1693,8 @@ ovsdb_idl_txn_verify(const struct ovsdb_idl_row *row_,
size_t column_idx = column - class->columns;
assert(row->new != NULL);
+ assert(row->old == NULL ||
+ row->table->modes[column_idx] & OVSDB_IDL_MONITOR);
if (!row->old
|| (row->written && bitmap_is_set(row->written, column_idx))) {
return;
--
1.7.1
More information about the dev
mailing list