From: Ben Pfaff Date: Wed, 8 Dec 2010 22:26:37 +0000 (-0800) Subject: ovsdb-idl: Check prerequisites for ovsdb_idl_txn_verify() also. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee21cfa751d9233a686d1a1c0c7ee6a3d6dac651;p=openvswitch ovsdb-idl: Check prerequisites for ovsdb_idl_txn_verify() also. 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. --- diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index 448f9c94..df5aff52 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;