]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/lcup.c
Fix typo
[openldap] / servers / slapd / back-bdb / lcup.c
index 9cf1a1479efe43b1bdc6daea421cac907bb5579e..633d8111af680f08fcac991e713f6c1143a58833 100644 (file)
@@ -110,11 +110,6 @@ bdb_psearch(
        int isroot = 0;
        int scopeok = 0;
 
-#ifdef SLAP_X_FILTER_HASSUBORDINATES
-       int             filter_hasSubordinates = 0;
-       Attribute       *hasSubordinates = NULL;
-#endif /* SLAP_X_FILTER_HASSUBORDINATES */
-
        u_int32_t       locker;
        DB_LOCK         lock;
 
@@ -386,14 +381,6 @@ dn2entry_retry:
                }
        }
 
-#ifdef SLAP_X_FILTER_HASSUBORDINATES
-       /*
-        * is hasSubordinates used in the filter ?
-        * FIXME: we may compute this directly when parsing the filter
-        */
-       filter_hasSubordinates = filter_has_subordinates( filter );
-#endif /* SLAP_X_FILTER_HASSUBORDINATES */
-
        lcupf.f_choice = LDAP_FILTER_AND;
        lcupf.f_and = &csnfnot;
        lcupf.f_next = NULL;
@@ -568,52 +555,12 @@ dn2entry_retry:
                goto test_done;
        }
 
-#ifdef SLAP_X_FILTER_HASSUBORDINATES
-       /*
-        * if hasSubordinates is used in the filter,
-        * append it to the entry's attributes
-        */
-       if ( filter_hasSubordinates ) {
-               int     hs;
-
-               rc = bdb_hasSubordinates( be, ps_conn, ps_op, e, &hs);
-               if ( rc != LDAP_SUCCESS ) {
-                       goto test_done;
-               }
-
-               hasSubordinates = slap_operational_hasSubordinate(
-                       hs == LDAP_COMPARE_TRUE );
-
-               if ( hasSubordinates == NULL ) {
-                       goto test_done;
-               }
-
-               hasSubordinates->a_next = e->e_attrs;
-               e->e_attrs = hasSubordinates;
-       }
-#endif /* SLAP_X_FILTER_HASSUBORDINATES */
-
        if ( psearch_type != LCUP_PSEARCH_BY_SCOPEOUT ) {
                rc = test_filter( be, ps_conn, ps_op, e, &lcupf );
        } else {
                rc = LDAP_COMPARE_TRUE;
        }
 
-#ifdef SLAP_X_FILTER_HASSUBORDINATES
-       if ( hasSubordinates ) {
-               /*
-                * FIXME: this is fairly inefficient, because 
-                * if hasSubordinates is among the required
-                * attrs, it will be added again later;
-                * maybe we should leave it and check
-                * check later if it's already present,
-                * if required
-                */
-               e->e_attrs = e->e_attrs->a_next;
-               attr_free( hasSubordinates );
-       }
-#endif /* SLAP_X_FILTER_HASSUBORDINATES */
-
        if ( rc == LDAP_COMPARE_TRUE ) {
                struct berval   dn;