Signed-off-by: Ben Pfaff <b...@ovn.org> --- lib/ovsdb-idl.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-)
diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index 3dbf0f7..ffee4b6 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -3080,23 +3080,6 @@ ovsdb_idl_txn_complete(struct ovsdb_idl_txn *txn, hmap_remove(&txn->idl->outstanding_txns, &txn->hmap_node); } -/* Writes 'datum' to the specified 'column' in 'row_'. Updates both 'row_' - * itself and the structs derived from it (e.g. the "struct ovsrec_*", for - * ovs-vswitchd). - * - * 'datum' must have the correct type for its column. The IDL does not check - * that it meets schema constraints, but ovsdb-server will do so at commit time - * so it had better be correct. - * - * A transaction must be in progress. Replication of 'column' must not have - * been disabled (by calling ovsdb_idl_omit()). - * - * Usually this function is used indirectly through one of the "set" functions - * generated by ovsdb-idlc. - * - * Takes ownership of what 'datum' points to (and in some cases destroys that - * data before returning) but makes a copy of 'datum' itself. (Commonly - * 'datum' is on the caller's stack.) */ static void ovsdb_idl_txn_write__(const struct ovsdb_idl_row *row_, const struct ovsdb_idl_column *column, @@ -3172,6 +3155,23 @@ discard_datum: } } +/* Writes 'datum' to the specified 'column' in 'row_'. Updates both 'row_' + * itself and the structs derived from it (e.g. the "struct ovsrec_*", for + * ovs-vswitchd). + * + * 'datum' must have the correct type for its column. The IDL does not check + * that it meets schema constraints, but ovsdb-server will do so at commit time + * so it had better be correct. + * + * A transaction must be in progress. Replication of 'column' must not have + * been disabled (by calling ovsdb_idl_omit()). + * + * Usually this function is used indirectly through one of the "set" functions + * generated by ovsdb-idlc. + * + * Takes ownership of what 'datum' points to (and in some cases destroys that + * data before returning) but makes a copy of 'datum' itself. (Commonly + * 'datum' is on the caller's stack.) */ void ovsdb_idl_txn_write(const struct ovsdb_idl_row *row, const struct ovsdb_idl_column *column, @@ -3180,6 +3180,8 @@ ovsdb_idl_txn_write(const struct ovsdb_idl_row *row, ovsdb_idl_txn_write__(row, column, datum, true); } +/* Similar to ovsdb_idl_txn_write(), except that the caller retains ownership + * of 'datum' and what it points to. */ void ovsdb_idl_txn_write_clone(const struct ovsdb_idl_row *row, const struct ovsdb_idl_column *column, -- 2.1.3 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev