]> git.sur5r.net Git - openldap/commitdiff
Don't return LDAP_OPERATIONS_ERROR for internal errors
authorKurt Zeilenga <kurt@openldap.org>
Sat, 1 Mar 2003 20:17:52 +0000 (20:17 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 1 Mar 2003 20:17:52 +0000 (20:17 +0000)
servers/slapd/back-sql/modify.c
servers/slapd/slapi/slapi_ops.c
servers/slapd/slapi/slapi_utils.c

index 3511ce9240e04de0f51efcaf41c3f179616a7aee..1b203f855eb17bd1a3e6c42d7148e5c13821a791 100644 (file)
@@ -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;
index 41da38de835024e03a19baf763591b527b068cc3..c318e9c39661748f9454af4d6b48493bc0907ec8 100644 (file)
@@ -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;
index 278764e75cc4acbb9cf80606e191fae4f9a9c6b4..6c8e47938baca1de89b3b73cd2a587d3d1d5560b 100644 (file)
@@ -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 );