From: Ben Pfaff Date: Wed, 9 Dec 2009 01:14:56 +0000 (-0800) Subject: ovsdb-idl: New function to obtain the current transaction from any row. X-Git-Tag: v1.0.0~259^2~437 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=76c91af91ea0738dd7ecae90e1ee76d84fca6f4b;p=sliver-openvswitch.git ovsdb-idl: New function to obtain the current transaction from any row. --- 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; +}