diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/dbwrap_ctdb.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source3/lib/dbwrap_ctdb.c b/source3/lib/dbwrap_ctdb.c index 49df62afd3..ec52d766c0 100644 --- a/source3/lib/dbwrap_ctdb.c +++ b/source3/lib/dbwrap_ctdb.c @@ -298,6 +298,27 @@ static struct ctdb_rec_data *db_ctdb_marshall_loop_next(struct ctdb_marshall_buf } +static int32_t db_ctdb_transaction_active(uint32_t db_id) +{ + int32_t status; + NTSTATUS ret; + TDB_DATA indata; + + indata.dptr = (uint8_t *)&db_id; + indata.dsize = sizeof(db_id); + + ret = ctdbd_control_local(messaging_ctdbd_connection(), + CTDB_CONTROL_TRANS2_ACTIVE, 0, 0, + indata, NULL, NULL, &status); + + if (!NT_STATUS_IS_OK(ret)) { + DEBUG(2, ("ctdb control TRANS2_ACTIVE failed\n")); + return -1; + } + + return status; +} + /** * CTDB transaction destructor |