From ff263ec6a72fbc1a7b8a9673168a1e94fa66e8d9 Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Tue, 21 Jan 2003 09:42:26 +0000 Subject: [PATCH] Return LDAP_OTHER instead of LDAP_OPERATIONS_ERROR for internal SLAPI failure --- servers/slapd/add.c | 2 +- servers/slapd/bind.c | 2 +- servers/slapd/compare.c | 2 +- servers/slapd/delete.c | 2 +- servers/slapd/extended.c | 8 ++++---- servers/slapd/modify.c | 2 +- servers/slapd/modrdn.c | 2 +- servers/slapd/search.c | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/servers/slapd/add.c b/servers/slapd/add.c index 9c55df9f79..0c5ea86c52 100644 --- a/servers/slapd/add.c +++ b/servers/slapd/add.c @@ -246,7 +246,7 @@ do_add( Connection *conn, Operation *op ) Debug(LDAP_DEBUG_TRACE, "do_add: add preoperation plugin failed.\n", 0, 0, 0); if ( slapi_pblock_get( pb, SLAPI_RESULT_CODE, (void *)&rc ) != 0 ) - rc = LDAP_OPERATIONS_ERROR; + rc = LDAP_OTHER; goto done; #endif } diff --git a/servers/slapd/bind.c b/servers/slapd/bind.c index d7b1cf36ec..826954a84a 100644 --- a/servers/slapd/bind.c +++ b/servers/slapd/bind.c @@ -559,7 +559,7 @@ do_bind( int ldapRc; if ( slapi_pblock_get( pb, SLAPI_RESULT_CODE, (void *)&ldapRc ) != 0 ) - ldapRc = LDAP_OPERATIONS_ERROR; + ldapRc = LDAP_OTHER; edn.bv_val = NULL; edn.bv_len = 0; diff --git a/servers/slapd/compare.c b/servers/slapd/compare.c index c9b328060f..34b4e50cce 100644 --- a/servers/slapd/compare.c +++ b/servers/slapd/compare.c @@ -294,7 +294,7 @@ do_compare( "failed.\n", 0, 0, 0); #endif if ( slapi_pblock_get( pb, SLAPI_RESULT_CODE, (void *)&rc ) != 0) - rc = LDAP_OPERATIONS_ERROR; + rc = LDAP_OTHER; goto cleanup; } #endif /* defined( LDAP_SLAPI ) */ diff --git a/servers/slapd/delete.c b/servers/slapd/delete.c index a431c080dd..8c72b8c073 100644 --- a/servers/slapd/delete.c +++ b/servers/slapd/delete.c @@ -178,7 +178,7 @@ do_delete( 0, 0, 0); #endif if ( slapi_pblock_get( pb, SLAPI_RESULT_CODE, (void *)&rc ) != 0 ) - rc = LDAP_OPERATIONS_ERROR; + rc = LDAP_OTHER; goto cleanup; } #endif /* defined( LDAP_SLAPI ) */ diff --git a/servers/slapd/extended.c b/servers/slapd/extended.c index c5ca7dca82..b658f215de 100644 --- a/servers/slapd/extended.c +++ b/servers/slapd/extended.c @@ -256,26 +256,26 @@ do_extended( rc = slapi_pblock_set( pb, SLAPI_EXT_OP_REQ_OID, (void *)reqoid.bv_val); if ( rc != LDAP_SUCCESS ) { - rc = LDAP_OPERATIONS_ERROR; + rc = LDAP_OTHER; goto done; } rc = slapi_pblock_set( pb, SLAPI_EXT_OP_REQ_VALUE, (void *)&reqdata); if ( rc != LDAP_SUCCESS ) { - rc = LDAP_OPERATIONS_ERROR; + rc = LDAP_OTHER; goto done; } rc = slapi_x_connection_set_pb( pb, conn ); if ( rc != LDAP_SUCCESS ) { - rc = LDAP_OPERATIONS_ERROR; + rc = LDAP_OTHER; goto done; } rc = slapi_x_operation_set_pb( pb, op ); if ( rc != LDAP_SUCCESS ) { - rc = LDAP_OPERATIONS_ERROR; + rc = LDAP_OTHER; goto done; } diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index f6dbac13fe..03c4c05537 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -362,7 +362,7 @@ do_modify( 0, 0, 0); #endif if ( slapi_pblock_get( pb, SLAPI_RESULT_CODE, (void *)&rc ) != 0) { - rc = LDAP_OPERATIONS_ERROR; + rc = LDAP_OTHER; } ldap_mods_free( modv, 1 ); modv = NULL; diff --git a/servers/slapd/modrdn.c b/servers/slapd/modrdn.c index ffa7410a36..5bb7071182 100644 --- a/servers/slapd/modrdn.c +++ b/servers/slapd/modrdn.c @@ -353,7 +353,7 @@ do_modrdn( "failed.\n", 0, 0, 0); #endif if ( slapi_pblock_get( pb, SLAPI_RESULT_CODE, (void *)&rc ) != 0) - rc = LDAP_OPERATIONS_ERROR; + rc = LDAP_OTHER; goto cleanup; } #endif /* defined( LDAP_SLAPI ) */ diff --git a/servers/slapd/search.c b/servers/slapd/search.c index d72b6397e6..c4c5fb01aa 100644 --- a/servers/slapd/search.c +++ b/servers/slapd/search.c @@ -367,7 +367,7 @@ do_search( "failed.\n", 0, 0, 0); #endif if ( slapi_pblock_get( pb, SLAPI_RESULT_CODE, (void *)&rc ) != 0) - rc = LDAP_OPERATIONS_ERROR; + rc = LDAP_OTHER; return rc; } #endif /* defined( LDAP_SLAPI ) */ -- 2.39.5