Lines Matching defs:tran

3220 prep_transaction(scf_transaction_t *tran, enum rep_protocol_requestid requestid,
3223 scf_handle_t *h = tran->tran_pg.rd_d.rd_handle;
3234 if (tran->tran_state != TRAN_STATE_SETUP ||
3235 tran->tran_invalid) {
3242 for (cur = uu_list_first(tran->tran_props); cur != NULL;
3243 cur = uu_list_next(tran->tran_props, cur)) {
3257 request->rpr_entityid = tran->tran_pg.rd_d.rd_entity;
3259 request->rpr_pg_action = tran->tran_pg_action;
3262 if (tran->tran_pg_type) {
3263 if (strlcpy(request->rpr_pg_type, tran->tran_pg_type,
3272 (void) strcpy(request->rpr_pg_type, tran->tran_pg_type);
3273 request->rpr_pg_flags = tran->tran_pg_flags;
3276 datael_finish_reset(&tran->tran_pg.rd_d);
3279 for (cur = uu_list_first(tran->tran_props); cur != NULL;
3280 cur = uu_list_next(tran->tran_props, cur)) {
3309 scf_prop_bundle_remove(scf_transaction_t *tran, char *bname)
3311 scf_handle_t *h = tran->tran_pg.rd_d.rd_handle;
3319 request = prep_transaction(tran, REP_PROTOCOL_PROP_BUNDLE_REMOVE, &r);
3348 tran->tran_state = TRAN_STATE_COMMITTED;
4539 scf_transaction_start(scf_transaction_t *tran, scf_propertygroup_t *pg)
4541 scf_handle_t *h = tran->tran_pg.rd_d.rd_handle;
4551 if (tran->tran_state != TRAN_STATE_NEW) {
4556 request.rpr_entityid_tx = tran->tran_pg.rd_d.rd_entity;
4559 datael_finish_reset(&tran->tran_pg.rd_d);
4578 tran->tran_state = TRAN_STATE_SETUP;
4579 tran->tran_invalid = 0;
4639 transaction_add(scf_transaction_t *tran, scf_transaction_entry_t *entry,
4643 scf_handle_t *h = tran->tran_pg.rd_d.rd_handle;
4665 if (tran->tran_state != TRAN_STATE_SETUP) {
4669 if (tran->tran_invalid) {
4677 old = uu_list_find(tran->tran_props, &prop, NULL, &idx);
4683 ret = datael_get_child_locked(&tran->tran_pg.rd_d, prop,
4735 entry->entry_tx = tran;
4736 uu_list_insert(tran->tran_props, entry, idx);
4759 scf_transaction_pg_bundle_remove(scf_transaction_t *tran)
4761 scf_handle_t *h = tran->tran_pg.rd_d.rd_handle;
4767 if (tran->tran_state != TRAN_STATE_SETUP) {
4771 if (tran->tran_invalid) {
4776 tran->tran_pg_action = REP_PROTOCOL_BUNDLE_REMOVE;
4797 scf_transaction_pg_modify(scf_transaction_t *tran, const char *type,
4800 scf_handle_t *h = tran->tran_pg.rd_d.rd_handle;
4806 if (tran->tran_state != TRAN_STATE_SETUP) {
4810 if (tran->tran_invalid) {
4815 if ((tran->tran_pg_type = strdup(type)) == NULL) {
4820 tran->tran_pg_flags = flags;
4912 scf_transaction_commit(scf_transaction_t *tran)
4914 scf_handle_t *h = tran->tran_pg.rd_d.rd_handle;
4922 request = prep_transaction(tran, REP_PROTOCOL_PROPERTYGRP_TX_COMMIT,
4945 tran->tran_state = TRAN_STATE_COMMITTED;
4951 transaction_reset(scf_transaction_t *tran)
4953 assert(MUTEX_HELD(&tran->tran_pg.rd_d.rd_handle->rh_lock));
4955 tran->tran_state = TRAN_STATE_NEW;
4956 free(tran->tran_pg_type);
4957 tran->tran_pg_type = NULL;
4958 tran->tran_pg_flags = 0;
4959 tran->tran_pg_action = 0;
4960 datael_reset_locked(&tran->tran_pg.rd_d);
4964 scf_transaction_reset_impl(scf_transaction_t *tran, int and_destroy,
4970 (void) pthread_mutex_lock(&tran->tran_pg.rd_d.rd_handle->rh_lock);
4972 while ((cur = uu_list_teardown(tran->tran_props, &cookie)) != NULL) {
4982 transaction_reset(tran);
4983 handle_unrefed(tran->tran_pg.rd_d.rd_handle);
4987 scf_transaction_reset(scf_transaction_t *tran)
4989 scf_transaction_reset_impl(tran, 0, 0);
4993 scf_transaction_reset_all(scf_transaction_t *tran)
4995 scf_transaction_reset_impl(tran, 0, 1);
5013 scf_transaction_destroy_children(scf_transaction_t *tran)
5015 if (tran == NULL)
5018 scf_transaction_reset_impl(tran, 1, 0);