]> git.sur5r.net Git - openldap/commitdiff
Clarification regarding compute search filter rewriting: only
authorLuke Howard <lukeh@openldap.org>
Wed, 22 Jan 2003 15:46:45 +0000 (15:46 +0000)
committerLuke Howard <lukeh@openldap.org>
Wed, 22 Jan 2003 15:46:45 +0000 (15:46 +0000)
SLAPI_SEARCH_FILTER needs to be updated

servers/slapd/search.c

index 06d616796557e3c6468e80a4dba0d0d256045337..664d7963de2905e0e1beede24ecfa28157c39919 100644 (file)
@@ -372,8 +372,21 @@ do_search(
        }
 
        if ( doPluginFNs( be, SLAPI_PLUGIN_COMPUTE_SEARCH_REWRITER_FN, pb ) == 0 ) {
+               /*
+                * The plugin can set the SLAPI_SEARCH_FILTER.
+                * SLAPI_SEARCH_STRFILER is not normative.
+                */
                slapi_pblock_get( pb, SLAPI_SEARCH_FILTER, (void *)&filter);
-               slapi_pblock_get( pb, SLAPI_SEARCH_STRFILTER, (void *)&fstr.bv_val );
+               ch_free( fstr.bv_val );
+               filter2bv( filter, &fstr );
+#ifdef NEW_LOGGING
+               LDAP_LOG( OPERATION, ARGS, 
+                       "do_search: after compute_rewrite_search filter: %s\n", 
+                       fstr.bv_len ? fstr.bv_val : "empty", 0 );
+#else
+               Debug( LDAP_DEBUG_ARGS, "    after compute_rewrite_search filter: %s\n",
+                       fstr.bv_len ? fstr.bv_val : "empty", 0, 0 );
+#endif
        }
 #endif /* defined( LDAP_SLAPI ) */