ovsdb-idl: New function to obtain the current transaction from any row.
authorBen Pfaff <blp@nicira.com>
Wed, 9 Dec 2009 01:14:56 +0000 (17:14 -0800)
committerBen Pfaff <blp@nicira.com>
Wed, 9 Dec 2009 01:14:56 +0000 (17:14 -0800)
lib/ovsdb-idl-provider.h
lib/ovsdb-idl.c

index cf6c486..8bc6f3e 100644 (file)
@@ -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 */
index 511ae91..9bb1201 100644 (file)
@@ -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;
+}