Tuesday, June 28, 2016

[389-commits] ldap/servers

ldap/servers/slapd/result.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

New commits:
commit 0157eb14e34e0acce7b5363741bd7c8d84cc9b32
Author: Noriko Hosoi <nhosoi@redhat.com>
Date: Tue Jun 28 13:31:35 2016 -0700

Ticket #48904 - syncrepl search returning error 329; plugin sending a bad error code

Description: Implemented based upon the analysis by lkrispen@redhat.com.
> the problem is in the new function send_ldap_intermediate() introduced for
> sync_repl, it calls log_result (....,rc, ) where rc is the return code of
> ber_put_seq(). It should call log_result( ...,1, ) if rc==LBER_ERROR and
> (...,0,..) else.

Instead of using 1 and 0, use ldap code LDAP_OPERATIONS_ERROR and LDAP_SUCCESS,
respectively.

https://fedorahosted.org/389/ticket/48904

Reviewed by wibrown@redhat.com (Thank you, William!!)

diff --git a/ldap/servers/slapd/result.c b/ldap/servers/slapd/result.c
index cb465bf..506da92 100644
--- a/ldap/servers/slapd/result.c
+++ b/ldap/servers/slapd/result.c
@@ -255,17 +255,19 @@ log_and_return:
* set o_status
*/

+ if (rc == LBER_ERROR) {
+ rc = LDAP_OPERATIONS_ERROR;
+ } else {
+ rc = LDAP_SUCCESS;
+ }
+
if ( logit && operation_is_flag_set( operation,
OP_FLAG_ACTION_LOG_ACCESS )) {
log_result( pb, operation, rc, tag, 0 );
}

LDAPDebug( LDAP_DEBUG_TRACE, "<= send_ldap_intermediate\n", 0, 0, 0 );
- if (rc == LBER_ERROR) {
- return(1);
- } else {
- return(0);
- }
+ return rc;
}

static int

--
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