lib/ovsdb-idl.c
/* Starts a new transaction on 'idl'.  A given ovsdb_idl may only have a single
 * active transaction at a time.  See the large comment in ovsdb-idl.h for
 * general information on transactions. */
Starts a new transaction on 'idl'.  A given ovsdb_idl may only have a single
active transaction at a time.  See the large comment in ovsdb-idl.h for
general information on transactions.
Starts a new transaction on ' idl ' . A given ovsdb_idl may only have a single active transaction at a time . See the large comment in ovsdb - idl . h for general information on transactions .
struct ovsdb_idl_txn *
ovsdb_idl_txn_create(struct ovsdb_idl *idl)
{
    struct ovsdb_idl_txn *txn;
    ovs_assert(!idl->data.txn);
    idl->data.txn = txn = xmalloc(sizeof *txn);
    txn->request_id = NULL;
    txn->db = &idl->data;
    hmap_init(&txn->txn_rows);
    txn->status = TXN_UNCOMMITTED;
    txn->error = NULL;
    txn->dry_run = false;
    ds_init(&txn->comment);
    txn->inc_table = NULL;
    txn->inc_column = NULL;
    hmap_init(&txn->inserted_rows);
    return txn;
}
struct ovsdb_idl_txn * ovsdb_idl_txn_create ( struct ovsdb_idl * idl ) { struct ovsdb_idl_txn * txn ; ovs_assert ( ! idl -> data . txn ) ; idl -> data . txn = txn = xmalloc ( sizeof * txn ) ; txn -> request_id = NULL ; txn -> db = & idl -> data ; hmap_init ( & txn -> txn_rows ) ; txn -> status = TXN_UNCOMMITTED ; txn -> error = NULL ; txn -> dry_run = false ; ds_init ( & txn -> comment ) ; txn -> inc_table = NULL ; txn -> inc_column = NULL ; hmap_init ( & txn -> inserted_rows ) ; return txn ; }
Starts a new transaction on 'idl'.
Starts a new transaction on ' idl ' .