ldap/servers/slapd/extendop.c | 20 ++++++++++++++++++--
ldap/servers/slapd/plugin.c | 8 --------
3 files changed, 19 insertions(+), 13 deletions(-)
New commits:
commit f6f9aa34e133ed3919879abaee294562d549250f
Author: Noriko Hosoi <nhosoi@redhat.com>
Date: Mon Jun 20 12:52:06 2016 -0700
Revert "Ticket 48837 - Replication: total init aborted"
Description:
1) Reverting commit e6ba94f61c4105403c46c76cd192061955bfd71b
2) Removing the unnecessary error message added in the Ticket 48770 patch.
diff --git a/ldap/servers/plugins/replication/repl5_total.c b/ldap/servers/plugins/replication/repl5_total.c
index 12b244d..0512dfa 100644
--- a/ldap/servers/plugins/replication/repl5_total.c
+++ b/ldap/servers/plugins/replication/repl5_total.c
@@ -866,7 +866,7 @@ multimaster_extop_NSDS50ReplicationEntry(Slapi_PBlock *pb)
rc, connid, opid);
}
- if (rc) {
+ if (LDAP_SUCCESS != rc) {
/* just disconnect from the supplier. bulk import is stopped when
connection object is destroyed */
slapi_pblock_get (pb, SLAPI_CONNECTION, &conn);
@@ -880,8 +880,6 @@ multimaster_extop_NSDS50ReplicationEntry(Slapi_PBlock *pb)
{
slapi_entry_free (e);
}
- } else {
- rc = SLAPI_PLUGIN_EXTENDED_SENT_RESULT;
}
return rc;
diff --git a/ldap/servers/slapd/extendop.c b/ldap/servers/slapd/extendop.c
index 5459f9e..978c92f 100644
--- a/ldap/servers/slapd/extendop.c
+++ b/ldap/servers/slapd/extendop.c
@@ -344,6 +344,13 @@ do_extended( Slapi_PBlock *pb )
if (rc == SLAPI_PLUGIN_EXTENDEDOP && p != NULL) {
slapi_log_error(SLAPI_LOG_TRACE, NULL, "extendop.c calling plugin ... \n");
+ /*
+ * Return values:
+ * SLAPI_PLUGIN_EXTENDED_SENT_RESULT: The result is already sent to the client.
+ * There is nothing to do further.
+ * SLAPI_PLUGIN_EXTENDED_NOT_HANDLED: Unsupported extended operation
+ * LDAP codes (e.g., LDAP_SUCCESS): The result is not sent yet. Call send_ldap_result.
+ */
rc = plugin_call_exop_plugins( pb, p);
slapi_log_error(SLAPI_LOG_TRACE, NULL, "extendop.c called exop, got %d \n", rc);
@@ -356,7 +363,7 @@ do_extended( Slapi_PBlock *pb )
if ( be == NULL ) {
slapi_log_error(SLAPI_LOG_FATAL, NULL, "extendop.c plugin_extended_op_getbackend was unable to retrieve a backend!!!\n");
- rc = SLAPI_PLUGIN_EXTENDED_NO_BACKEND_AVAILABLE;
+ rc = LDAP_OPERATIONS_ERROR;
} else {
/* We need to make a new be pb here because when you set SLAPI_BACKEND
* you overwrite the plg parts of the pb. So if we re-use pb
@@ -370,6 +377,13 @@ do_extended( Slapi_PBlock *pb )
if (txn_rc) {
slapi_log_error(SLAPI_LOG_FATAL, NULL, "exendop.c Failed to start be_txn for plugin_call_exop_plugins %d\n", txn_rc);
} else {
+ /*
+ * Return values:
+ * SLAPI_PLUGIN_EXTENDED_SENT_RESULT: The result is already sent to the client.
+ * There is nothing to do further.
+ * SLAPI_PLUGIN_EXTENDED_NOT_HANDLED: Unsupported extended operation
+ * LDAP codes (e.g., LDAP_SUCCESS): The result is not sent yet. Call send_ldap_result.
+ */
rc = plugin_call_exop_plugins( pb, p );
slapi_log_error(SLAPI_LOG_TRACE, NULL, "extendop.c called betxn exop, got %d \n", rc);
if (rc == LDAP_SUCCESS || rc == SLAPI_PLUGIN_EXTENDED_SENT_RESULT) {
@@ -399,7 +413,9 @@ do_extended( Slapi_PBlock *pb )
lderr = LDAP_PROTOCOL_ERROR; /* no plugin handled the op */
errmsg = "unsupported extended operation";
} else {
- slapi_log_error(SLAPI_LOG_FATAL, NULL, "extendop.c failed with result %d \n", rc);
+ if (rc != LDAP_SUCCESS) {
+ slapi_log_error(SLAPI_LOG_FATAL, NULL, "extendop.c failed with result %d \n", rc);
+ }
errmsg = NULL;
lderr = rc;
}
diff --git a/ldap/servers/slapd/plugin.c b/ldap/servers/slapd/plugin.c
index de907d8..1736377 100644
--- a/ldap/servers/slapd/plugin.c
+++ b/ldap/servers/slapd/plugin.c
@@ -543,14 +543,6 @@ plugin_call_exop_plugins( Slapi_PBlock *pb, struct slapdplugin *p )
slapi_pblock_set( pb, SLAPI_PLUGIN, p );
set_db_default_result_handlers( pb );
rc = (*p->plg_exhandler)( pb );
- if (LDAP_SUCCESS == rc) {
- /*
- * Some plugin may return LDAP_SUCCESS in the success case.
- * It is translated to SLAPI_PLUGIN_EXTENDED_SENT_RESULT to
- * reduce the unnecessary error logs.
- */
- rc = SLAPI_PLUGIN_EXTENDED_SENT_RESULT;
- }
return (rc);
}
--
389-commits mailing list
389-commits@lists.fedoraproject.org
https://lists.fedoraproject.org/admin/lists/389-commits@lists.fedoraproject.org
No comments:
Post a Comment