From 76c91af91ea0738dd7ecae90e1ee76d84fca6f4b Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 8 Dec 2009 17:14:56 -0800 Subject: [PATCH] ovsdb-idl: New function to obtain the current transaction from any row. --- lib/ovsdb-idl-provider.h | 2 ++ lib/ovsdb-idl.c | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/lib/ovsdb-idl-provider.h b/lib/ovsdb-idl-provider.h index cf6c48646..8bc6f3e72 100644 --- a/lib/ovsdb-idl-provider.h +++ b/lib/ovsdb-idl-provider.h @@ -84,4 +84,6 @@ struct ovsdb_idl_row *ovsdb_idl_txn_insert( struct ovsdb_idl_txn *, const struct ovsdb_idl_table_class *); +struct ovsdb_idl_txn *ovsdb_idl_txn_get(const struct ovsdb_idl_row *); + #endif /* ovsdb-idl-provider.h */ diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index 511ae9130..9bb120140 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -1222,3 +1222,11 @@ ovsdb_idl_txn_process_reply(struct ovsdb_idl *idl, ovsdb_idl_txn_complete(txn, status); return true; } + +struct ovsdb_idl_txn * +ovsdb_idl_txn_get(const struct ovsdb_idl_row *row) +{ + struct ovsdb_idl_txn *txn = row->table->idl->txn; + assert(txn != NULL); + return txn; +} -- 2.45.2