2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

ovsdb-idl: Plug hole in state machine.

The state machine didn't have a proper state for "not yet committed or
aborted", which meant that destroying an ovsdb_idl_txn without committing
or aborting it caused a segfault.  This fixes the problem by adding a new
state TXN_UNCOMMITTED to the state machine.

This is related to commit 79554078d "ovsdb-idl: Fix bad logic in
ovsdb_idl_txn_commit() state transitions", which fixed a related bug.

Bug #2438.
This commit is contained in:
Ben Pfaff
2011-06-20 16:17:44 -07:00
parent e2eed6a758
commit 2096903b45
5 changed files with 43 additions and 3 deletions

View File

@@ -111,6 +111,7 @@ bool ovsdb_idl_row_is_synthetic(const struct ovsdb_idl_row *);
/* Transactions. */
enum ovsdb_idl_txn_status {
TXN_UNCOMMITTED, /* Not yet committed or aborted. */
TXN_UNCHANGED, /* Transaction didn't include any changes. */
TXN_INCOMPLETE, /* Commit in progress, please wait. */
TXN_ABORTED, /* ovsdb_idl_txn_abort() called. */