From: Pierangelo Masarati Date: Mon, 10 Feb 2003 22:34:06 +0000 (+0000) Subject: improve error handling X-Git-Tag: NO_SLAP_OP_BLOCKS~374 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=628bcc7174c3dd1ee5e99e41c9335c72507b53d0;p=openldap improve error handling --- diff --git a/servers/slapd/back-meta/add.c b/servers/slapd/back-meta/add.c index 61ce46deed..64e1efafda 100644 --- a/servers/slapd/back-meta/add.c +++ b/servers/slapd/back-meta/add.c @@ -102,7 +102,8 @@ meta_back_add( */ lc = meta_back_getconn( li, conn, op, META_OP_REQUIRE_SINGLE, &e->e_nname, &candidate ); - if ( !lc || !meta_back_dobind( lc, op ) || !meta_back_is_valid( lc, candidate ) ) { + if ( !lc || !meta_back_dobind( lc, op ) + || !meta_back_is_valid( lc, candidate ) ) { send_ldap_result( conn, op, LDAP_OTHER, NULL, NULL, NULL, NULL ); return -1; diff --git a/servers/slapd/back-meta/compare.c b/servers/slapd/back-meta/compare.c index 815e515cad..b4131c7557 100644 --- a/servers/slapd/back-meta/compare.c +++ b/servers/slapd/back-meta/compare.c @@ -96,6 +96,8 @@ meta_back_compare( lc = meta_back_getconn( li, conn, op, META_OP_ALLOW_MULTIPLE, ndn, NULL ); if ( !lc || !meta_back_dobind( lc, op ) ) { + send_ldap_result( conn, op, LDAP_OTHER, + NULL, NULL, NULL, NULL ); return -1; } diff --git a/servers/slapd/back-meta/delete.c b/servers/slapd/back-meta/delete.c index 127bbfd4f4..22a9e569ed 100644 --- a/servers/slapd/back-meta/delete.c +++ b/servers/slapd/back-meta/delete.c @@ -92,9 +92,10 @@ meta_back_delete( lc = meta_back_getconn( li, conn, op, META_OP_REQUIRE_SINGLE, ndn, &candidate ); - if ( !lc || !meta_back_dobind( lc, op ) || !meta_back_is_valid( lc, candidate ) ) { - send_ldap_result( conn, op, LDAP_OTHER, - NULL, NULL, NULL, NULL ); + if ( !lc || !meta_back_dobind( lc, op ) + || !meta_back_is_valid( lc, candidate ) ) { + send_ldap_result( conn, op, LDAP_OTHER, + NULL, NULL, NULL, NULL ); return -1; } diff --git a/servers/slapd/back-meta/modify.c b/servers/slapd/back-meta/modify.c index 01fec49787..0480d4936b 100644 --- a/servers/slapd/back-meta/modify.c +++ b/servers/slapd/back-meta/modify.c @@ -96,9 +96,10 @@ meta_back_modify( lc = meta_back_getconn( li, conn, op, META_OP_REQUIRE_SINGLE, ndn, &candidate ); - if ( !lc || !meta_back_dobind( lc, op ) || !meta_back_is_valid( lc, candidate ) ) { - send_ldap_result( conn, op, LDAP_OTHER, - NULL, NULL, NULL, NULL ); + if ( !lc || !meta_back_dobind( lc, op ) + || !meta_back_is_valid( lc, candidate ) ) { + send_ldap_result( conn, op, LDAP_OTHER, + NULL, NULL, NULL, NULL ); return -1; } diff --git a/servers/slapd/back-meta/modrdn.c b/servers/slapd/back-meta/modrdn.c index 1169052a96..34cfebfe96 100644 --- a/servers/slapd/back-meta/modrdn.c +++ b/servers/slapd/back-meta/modrdn.c @@ -97,9 +97,10 @@ meta_back_modrdn( lc = meta_back_getconn( li, conn, op, META_OP_REQUIRE_SINGLE, ndn, &candidate ); - if ( !lc || !meta_back_dobind( lc, op ) || !meta_back_is_valid( lc, candidate ) ) { - send_ldap_result( conn, op, LDAP_OTHER, - NULL, NULL, NULL, NULL ); + if ( !lc || !meta_back_dobind( lc, op ) + || !meta_back_is_valid( lc, candidate ) ) { + send_ldap_result( conn, op, LDAP_OTHER, + NULL, NULL, NULL, NULL ); return -1; } diff --git a/servers/slapd/back-meta/search.c b/servers/slapd/back-meta/search.c index a11cc1d44a..39e2114ae5 100644 --- a/servers/slapd/back-meta/search.c +++ b/servers/slapd/back-meta/search.c @@ -138,6 +138,8 @@ meta_back_search( lc = meta_back_getconn( li, conn, op, META_OP_ALLOW_MULTIPLE, nbase, NULL ); if ( !lc || !meta_back_dobind( lc, op ) ) { + send_ldap_result( conn, op, LDAP_OTHER, + NULL, NULL, NULL, NULL ); return -1; }