diff options
author | Nalin Dahyabhai <nalin@redhat.com> | 2012-01-09 15:02:20 -0500 |
---|---|---|
committer | Nalin Dahyabhai <nalin@redhat.com> | 2012-01-09 15:02:20 -0500 |
commit | d4e45d47a737b3af775c62a8ed50c5e646829284 (patch) | |
tree | 8e72a8fc0fc560080b2edd58003091ea095ddf0e /src/back-shr.c | |
parent | ec00275ed1173caac8bc1f5b5a1a45d9c3bb25a5 (diff) | |
download | slapi-nis-d4e45d47a737b3af775c62a8ed50c5e646829284.tar.gz slapi-nis-d4e45d47a737b3af775c62a8ed50c5e646829284.tar.xz slapi-nis-d4e45d47a737b3af775c62a8ed50c5e646829284.zip |
- most of what's needed to hook back-end txn postoperations, except for the passing the TXN ID around, which means we deadlock if we actually do it
Diffstat (limited to 'src/back-shr.c')
-rw-r--r-- | src/back-shr.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/back-shr.c b/src/back-shr.c index c9f46a6..5697a9e 100644 --- a/src/back-shr.c +++ b/src/back-shr.c @@ -1952,3 +1952,37 @@ backend_shr_internal_postop_init(Slapi_PBlock *pb, struct plugin_state *state) } return 0; } + +#ifdef USE_SLAPI_BE_TXNS +int +backend_shr_be_txn_postop_init(Slapi_PBlock *pb, struct plugin_state *state) +{ +#if 0 + if (slapi_pblock_set(pb, SLAPI_PLUGIN_BE_TXN_POST_ADD_FN, + backend_shr_add_cb) != 0) { + slapi_log_error(SLAPI_LOG_PLUGIN, state->plugin_desc->spd_id, + "error hooking up be-txn-post add callback\n"); + return -1; + } + if (slapi_pblock_set(pb, SLAPI_PLUGIN_BE_TXN_POST_MODIFY_FN, + backend_shr_modify_cb) != 0) { + slapi_log_error(SLAPI_LOG_PLUGIN, state->plugin_desc->spd_id, + "error hooking up be-txn-post modify callback\n"); + return -1; + } + if (slapi_pblock_set(pb, SLAPI_PLUGIN_BE_TXN_POST_MODRDN_FN, + backend_shr_modrdn_cb) != 0) { + slapi_log_error(SLAPI_LOG_PLUGIN, state->plugin_desc->spd_id, + "error hooking up be-txn-post modrdn callback\n"); + return -1; + } + if (slapi_pblock_set(pb, SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN, + backend_shr_delete_cb) != 0) { + slapi_log_error(SLAPI_LOG_PLUGIN, state->plugin_desc->spd_id, + "error hooking up be-txn-post delete callback\n"); + return -1; + } +#endif + return 0; +} +#endif |