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-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76c91af91ea0738dd7ecae90e1ee76d84fca6f4b;p=openvswitch 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 cf6c4864..8bc6f3e7 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 511ae913..9bb12014 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; +}