ldap/servers/plugins/usn/usn.c | 10 ++++++----
ldap/servers/slapd/back-ldbm/ldbm_delete.c | 4 ++--
2 files changed, 8 insertions(+), 6 deletions(-)
New commits:
commit e21aada2eb5f8b4c1efe43f273cb4c2bab759c47
Author: Ludwig Krispenz <lkrispen(a)redhat.com>
Date: Thu Mar 13 15:34:08 2014 +0100
Ticket 47732 - ds logs many "SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN plugin returned
error" messages
Bug Description: there are many error messages relate to postop delete plugins
whichare not justified
Fix Description: the usn plugin always returns an error when an attempt is made
to delete a non-existing entry, checking the ldap code in
the pblock.
But the plugin executes correctly and the error is aleady set
so return succes
https://fedorahosted.org/389/ticket/47732
Reviewed by: richm, thanks
diff --git a/ldap/servers/plugins/usn/usn.c b/ldap/servers/plugins/usn/usn.c
index 8b1b714..73323b3 100644
--- a/ldap/servers/plugins/usn/usn.c
+++ b/ldap/servers/plugins/usn/usn.c
@@ -520,8 +520,8 @@ usn_bepostop (Slapi_PBlock *pb)
/* if op is not successful, don't increment the counter */
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &rc);
if (LDAP_SUCCESS != rc) {
- slapi_pblock_set(pb, SLAPI_RESULT_CODE, &rc);
- rc = SLAPI_PLUGIN_FAILURE;
+ /* no plugin failure */
+ rc = SLAPI_PLUGIN_SUCCESS;
goto bail;
}
@@ -557,7 +557,8 @@ usn_bepostop_modify (Slapi_PBlock *pb)
/* if op is not successful, don't increment the counter */
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &rc);
if (LDAP_SUCCESS != rc) {
- rc = SLAPI_PLUGIN_FAILURE;
+ /* no plugin failure */
+ rc = SLAPI_PLUGIN_SUCCESS;
goto bail;
}
@@ -606,7 +607,8 @@ usn_bepostop_delete (Slapi_PBlock *pb)
/* if op is not successful, don't increment the counter */
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &rc);
if (LDAP_SUCCESS != rc) {
- rc = SLAPI_PLUGIN_FAILURE;
+ /* no plugin failure */
+ rc = SLAPI_PLUGIN_SUCCESS;
goto bail;
}
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_delete.c
b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
index ce2a154..13d02ac 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_delete.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
@@ -1089,7 +1089,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
/* call the transaction post delete plugins just before the commit */
if (plugin_call_plugins(pb, SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN)) {
- LDAPDebug0Args( LDAP_DEBUG_ANY, "SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN plugin "
+ LDAPDebug0Args( LDAP_DEBUG_TRACE, "SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN plugin
"
"returned error code\n" );
if (!ldap_result_code) {
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &ldap_result_code);
@@ -1198,7 +1198,7 @@ error_return:
/* call the transaction post delete plugins just before the abort */
if (plugin_call_plugins(pb, SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN)) {
- LDAPDebug1Arg( LDAP_DEBUG_ANY, "SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN plugin "
+ LDAPDebug1Arg( LDAP_DEBUG_TRACE, "SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN plugin
"
"returned error code %d\n", retval );
if (!ldap_result_code) {
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &ldap_result_code);