summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@dahyabhai.net>2012-11-14 10:27:23 -0500
committerNalin Dahyabhai <nalin@dahyabhai.net>2012-11-14 10:27:23 -0500
commitf82045c0b7f8090376dcb3cc77dbee487b6eb182 (patch)
treef5db161ee4a3974fd29ce9455cc2af133cfc92e6
parentd80ce0def40c2b4d1f8627791707ee074040920a (diff)
downloadslapi-nis-f82045c0b7f8090376dcb3cc77dbee487b6eb182.tar.gz
slapi-nis-f82045c0b7f8090376dcb3cc77dbee487b6eb182.tar.xz
slapi-nis-f82045c0b7f8090376dcb3cc77dbee487b6eb182.zip
log message fixups
- put a newline at the end of these two messages - register callbacks in a consistent order
-rw-r--r--src/plug-nis.c2
-rw-r--r--src/plug-sch.c22
2 files changed, 13 insertions, 11 deletions
diff --git a/src/plug-nis.c b/src/plug-nis.c
index 85aa3e2..212063a 100644
--- a/src/plug-nis.c
+++ b/src/plug-nis.c
@@ -517,7 +517,7 @@ nis_plugin_init(Slapi_PBlock *pb)
"nsslapd-pluginbetxn",
DEFAULT_PLUGIN_USE_BETXNS);
slapi_log_error(SLAPI_LOG_PLUGIN, state->plugin_desc->spd_id,
- "starting with betxn support %s",
+ "starting with betxn support %s\n",
is_betxn ? "enabled" : "disabled");
state->use_be_txns = is_betxn;
}
diff --git a/src/plug-sch.c b/src/plug-sch.c
index 913ab5e..23af048 100644
--- a/src/plug-sch.c
+++ b/src/plug-sch.c
@@ -219,7 +219,7 @@ schema_compat_plugin_init(Slapi_PBlock *pb)
"nsslapd-pluginbetxn",
DEFAULT_PLUGIN_USE_BETXNS);
slapi_log_error(SLAPI_LOG_PLUGIN, state->plugin_desc->spd_id,
- "starting with betxn support %s",
+ "starting with betxn support %s\n",
is_betxn ? "enabled" : "disabled");
state->use_be_txns = is_betxn;
}
@@ -252,15 +252,6 @@ schema_compat_plugin_init(Slapi_PBlock *pb)
"error registering betxn preoperation plugin\n");
return -1;
}
- if (slapi_register_plugin("betxnpostoperation", TRUE,
- "schema_compat_plugin_init_betxn_postop",
- schema_compat_plugin_init_betxn_postop,
- PLUGIN_BETXN_POSTOP_ID, NULL,
- state->plugin_identity) != 0) {
- slapi_log_error(SLAPI_LOG_PLUGIN, state->plugin_desc->spd_id,
- "error registering betxn postoperation plugin\n");
- return -1;
- }
#endif
if (slapi_register_plugin("postoperation", TRUE,
"schema_compat_plugin_init_postop",
@@ -280,6 +271,17 @@ schema_compat_plugin_init(Slapi_PBlock *pb)
"error registering internal postoperation plugin\n");
return -1;
}
+#ifdef SLAPI_NIS_SUPPORT_BE_TXNS
+ if (slapi_register_plugin("betxnpostoperation", TRUE,
+ "schema_compat_plugin_init_betxn_postop",
+ schema_compat_plugin_init_betxn_postop,
+ PLUGIN_BETXN_POSTOP_ID, NULL,
+ state->plugin_identity) != 0) {
+ slapi_log_error(SLAPI_LOG_PLUGIN, state->plugin_desc->spd_id,
+ "error registering betxn postoperation plugin\n");
+ return -1;
+ }
+#endif
slapi_log_error(SLAPI_LOG_PLUGIN, state->plugin_desc->spd_id,
"registered plugin hooks\n");
global_plugin_state = NULL;