From c981ebcb61bf4cb5c140aa9d479bdcc493dca7b8 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 1 Mar 2003 20:17:52 +0000 Subject: [PATCH] Don't return LDAP_OPERATIONS_ERROR for internal errors --- servers/slapd/back-sql/modify.c | 2 +- servers/slapd/slapi/slapi_ops.c | 10 ++++------ servers/slapd/slapi/slapi_utils.c | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/servers/slapd/back-sql/modify.c b/servers/slapd/back-sql/modify.c index 3511ce9240..1b203f855e 100644 --- a/servers/slapd/back-sql/modify.c +++ b/servers/slapd/back-sql/modify.c @@ -701,7 +701,7 @@ backsql_modrdn( Debug( LDAP_DEBUG_TRACE, "backsql_modrdn(): " "newSuperior is equal to entry being moved " "- aborting\n", 0, 0, 0 ); - send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, + send_ldap_result( conn, op, LDAP_OTHER, NULL, "newSuperior is equal to old DN", NULL, NULL ); goto modrdn_return; diff --git a/servers/slapd/slapi/slapi_ops.c b/servers/slapd/slapi/slapi_ops.c index 41da38de83..c318e9c396 100644 --- a/servers/slapd/slapi/slapi_ops.c +++ b/servers/slapd/slapi/slapi_ops.c @@ -545,7 +545,7 @@ slapi_delete_internal( } rc = LDAP_SUCCESS; } else { - rc = LDAP_OPERATIONS_ERROR; + rc = LDAP_OTHER; } } else { rc = LDAP_REFERRAL; @@ -708,7 +708,6 @@ slapi_add_internal( * of an entry in the backend directly * Return values : LDAP_SUCCESS * LDAP_PARAM_ERROR - * LDAP_OPERATIONS_ERROR * LDAP_NO_MEMORY * LDAP_OTHER * LDAP_UNWILLING_TO_PERFORM @@ -823,7 +822,7 @@ slapi_modrdn_internal( rc = LDAP_SUCCESS; } else { - rc = LDAP_OPERATIONS_ERROR; + rc = LDAP_OTHER; } } else { @@ -867,7 +866,6 @@ cleanup: * Return values : LDAP_SUCCESS * LDAP_PARAM_ERROR * LDAP_NO_MEMORY - * LDAP_OPERATIONS_ERROR * LDAP_OTHER * LDAP_UNWILLING_TO_PERFORM */ @@ -1039,7 +1037,7 @@ slapi_modify_internal( } rc = LDAP_SUCCESS; } else { - rc = LDAP_OPERATIONS_ERROR; + rc = LDAP_OTHER; } } else { rc = LDAP_REFERRAL; @@ -1213,7 +1211,7 @@ slapi_search_internal_bind( if ( rc == 0 ) { rc = LDAP_SUCCESS; } else { - rc = LDAP_OPERATIONS_ERROR; + rc = LDAP_OTHER; } } else { rc = LDAP_UNWILLING_TO_PERFORM; diff --git a/servers/slapd/slapi/slapi_utils.c b/servers/slapd/slapi/slapi_utils.c index 278764e75c..6c8e47938b 100644 --- a/servers/slapd/slapi/slapi_utils.c +++ b/servers/slapd/slapi/slapi_utils.c @@ -635,8 +635,8 @@ slapi_entry_delete_values( Slapi_Entry *e, const char *type, struct berval **val } if ( vals[0] == NULL ) { - /* SLAPI doco says LDAP_OPERATIONS_ERROR */ - return attr_delete( &e->e_attrs, mod.sm_desc ) ? LDAP_OPERATIONS_ERROR : LDAP_SUCCESS; + /* SLAPI doco says LDAP_OPERATIONS_ERROR but LDAP_OTHER is better */ + return attr_delete( &e->e_attrs, mod.sm_desc ) ? LDAP_OTHER : LDAP_SUCCESS; } rc = bvptr2obj( vals, &mod.sm_bvalues ); -- 2.39.5