]> git.sur5r.net Git - openldap/commitdiff
unifdef LDAP_CACHING
authorJong Hyuk Choi <jongchoi@openldap.org>
Wed, 27 Aug 2003 23:21:17 +0000 (23:21 +0000)
committerJong Hyuk Choi <jongchoi@openldap.org>
Wed, 27 Aug 2003 23:21:17 +0000 (23:21 +0000)
14 files changed:
servers/slapd/back-meta/back-meta.h
servers/slapd/back-meta/cache-config.c
servers/slapd/back-meta/cache-merge.c
servers/slapd/back-meta/cache-query.c
servers/slapd/back-meta/cache-remove.c
servers/slapd/back-meta/cache-search.c
servers/slapd/back-meta/cache-substring.c
servers/slapd/back-meta/cache-template.c
servers/slapd/back-meta/cache.h
servers/slapd/back-meta/config.c
servers/slapd/back-meta/init.c
servers/slapd/back-meta/search.c
servers/slapd/schema_prep.c
servers/slapd/slap.h

index 41b6cda62804505b96a91dbcd307393a2b8eaf40..56623fc6409b09e627209d179a0276b9c6b52e33 100644 (file)
@@ -150,11 +150,9 @@ struct metainfo {
 #define META_DEFAULT_TARGET_NONE       -1
        struct metatarget       **targets;
 
-#ifdef LDAP_CACHING 
        struct rewrite_info     *rwinfo;
        cache_manager           *cm; 
        Backend                 *glue_be; 
-#endif /* LDAP_CACHING */
 
        struct metadncache      cache;
        
index a4417949f27f3d1365c3c3cafbc1c3a098e38bf7..b14e28a3e014f17c2f409f3f1808efb712db6ed5 100644 (file)
@@ -27,7 +27,6 @@
 #include "../back-ldap/back-ldap.h"
 #include "back-meta.h"
 
-#ifdef LDAP_CACHING 
 #define MAX_ATTR_SETS 500 
 static void find_supersets( struct attr_set* attr_sets, int numsets ); 
 static int compare_sets( struct attr_set* setA, int, int );
@@ -329,4 +328,3 @@ compare_sets(struct attr_set* set, int i, int j)
 
        return result; 
 }
-#endif
index 83e0c8ba2cdf4459aea1962e21bd6aa479b8d2af..211ec672e372dba2c359499644a1880a267be5c3 100644 (file)
@@ -34,8 +34,6 @@
 #include "../../../libraries/libldap/ldap-int.h"
 #include <sys/time.h>
 
-#ifdef LDAP_CACHING
-
 static struct berval bv_queryid_any = BER_BVC( "(queryid=*)" );
 
 static Attribute* 
@@ -286,5 +284,3 @@ normalize_values( Attribute* attr )
 
        return LDAP_SUCCESS;
 }
-
-#endif /* LDAP_CACHING */
index 99db22d87835fe899ce510b68581969393deeee1..1571ec380f0108c977f3c64dd46183615900b878 100644 (file)
@@ -26,7 +26,6 @@
 #include "../back-ldap/back-ldap.h"
 #include "back-meta.h"
 
-#ifdef LDAP_CACHING 
 static void    add_query_on_top (query_manager*, CachedQuery*);
 static int     base_scope_compare(struct berval* dn_stored, 
                                   struct berval* dn_incoming, int scope_stored,
@@ -465,4 +464,3 @@ remove_from_template (CachedQuery* qc, QueryTemplate* template)
 
        template->no_of_queries--;  
 }    
-#endif
index 4b1a65b0046fdc15815173e33c8bfc95a59c231a..f375ea11eb103f518f5e5caf524a91d5fd860900 100644 (file)
@@ -34,7 +34,6 @@
 #include "../../../libraries/libldap/ldap-int.h"
 #include <sys/time.h>
 
-#ifdef LDAP_CACHING 
 static int
 remove_func (
        Operation       *op,
@@ -188,5 +187,3 @@ remove_func (
 
        return 0;
 }
-
-#endif /* LDAP_CACHING */
index b8df2bb57d1cf2727719dd38d4310303b4b2a343..8f61bef9f6348f3c959bea302bdd6e0d9c67df42 100644 (file)
 #include "ldap_log.h"
 #include "../../../libraries/libldap/ldap-int.h"
 
-#ifdef LDAP_CACHING 
 static Entry* 
 meta_create_entry(
        Backend         *be,
@@ -1840,4 +1839,3 @@ cache_back_sentry(
                return 0; 
        }
 }
-#endif
index 8871093620454b3c401de6fd8886307ae72c7528..574ec2509eb4b8c60804dd1f9f27ccf5d8ee1ba8 100644 (file)
@@ -35,7 +35,6 @@
 #include "slap.h"
 #include "back-meta.h"
 
-#ifdef LDAP_CACHING 
 static char* invert_string(char* string);
 static struct berval* merge_init_final(struct berval*, struct berval*, struct berval*); 
 static int strings_containment(struct berval* stored, struct berval* incoming); 
@@ -287,4 +286,3 @@ final:
        */
        return rc;
 }              
-#endif
index bad7b5b8d3820d85600d0a81dda1fc3b301a0539..64fd2d28aa3643b936c4eb4e2e670ca96f033313 100644 (file)
@@ -30,7 +30,6 @@
 #undef ldap_debug      /* silence a warning in ldap-int.h */
 #include "../../../libraries/libldap/ldap-int.h"
 
-#ifdef LDAP_CACHING
 void 
 filter2template(
        Filter                  *f,
@@ -244,4 +243,3 @@ filter2template(
                return;
        }
 }
-#endif /* LDAP_CACHING */
index 2e2328cefdbd9d061064c5ab5749d04b4e1e977a..1f7a50c0834f838fecaa8e0d6e8fc9002492601b 100644 (file)
@@ -27,7 +27,6 @@ EVEN
 #define META_CACHE_H
 #include "slap.h"
 
-#ifdef LDAP_CACHING
 /* cache specific errors */
 enum type_of_result 
 { 
@@ -215,4 +214,3 @@ remove_query_data (
                   struct exception* result
 );
 #endif
-#endif
index f404141cd6c41b3cc4c2ceadca36b1aa20c992bc..9685449d890f18a6e1bde12c3c84528b4eed58a3 100644 (file)
@@ -522,17 +522,11 @@ meta_back_db_config(
                int             i = li->ntargets-1;
 
                if ( i < 0 ) {
-#ifndef LDAP_CACHING
-                       fprintf( stderr,
-       "%s: line %d: need \"uri\" directive first\n",
-                               fname, lineno );
-#else /* LDAP_CACHING */
                        if ( strcasecmp( argv[0], "rewriteEngine" ) == 0 ) {
                                li->rwinfo = rewrite_info_init( REWRITE_MODE_USE_DEFAULT );
                        }
                        return rewrite_parse(li->rwinfo, fname, lineno,
                                        argc, argv); 
-#endif /* LDAP_CACHING */
                }
                
                return rewrite_parse( li->targets[ i ]->rwmap.rwm_rw, fname, lineno,
@@ -554,11 +548,9 @@ meta_back_db_config(
                                fname, lineno, argc, argv );
        /* anything else */
        } else {
-#ifdef LDAP_CACHING
                if ( meta_back_cache_config( be, fname, lineno, argc, argv ) == 0 ) {
                        return 0;
                }
-#endif /* LDAP_CACHING */
 
                fprintf( stderr,
        "%s: line %d: unknown directive \"%s\" in meta database definition"
index 184b22cbeb058ba3c173da28e0fd8cc8e57206d7..3f8009a185667d9ca4eb2d9be712270610879c8b 100644 (file)
@@ -136,7 +136,6 @@ meta_back_db_init(
 {
        struct metainfo *li;
 
-#ifdef LDAP_CACHING
        struct rewrite_info     *rwinfo;
        cache_manager           *cm;
        query_manager           *qm;
@@ -187,7 +186,6 @@ meta_back_db_init(
        ldap_pvt_thread_mutex_init(&cm->cache_mutex); 
        ldap_pvt_thread_mutex_init(&cm->remove_mutex); 
        ldap_pvt_thread_mutex_init( &cm->cc_mutex );
-#endif /* LDAP_CACHING */
 
        li = ch_calloc( 1, sizeof( struct metainfo ) );
        if ( li == NULL ) {
@@ -199,11 +197,9 @@ meta_back_db_init(
         * this may change
         */
        li->defaulttarget = META_DEFAULT_TARGET_NONE;
-#ifdef LDAP_CACHING
        li->cm = cm; 
        li->rwinfo = rwinfo;
        /* FIXME: what about qm ? */
-#endif /* LDAP_CACHING */
 
        ldap_pvt_thread_mutex_init( &li->conn_mutex );
        ldap_pvt_thread_mutex_init( &li->cache.mutex );
index 6ac2a91e5f6a0ad700b3a159ee5c454af56ba99a..940ce702cc6f66c52f2442908e544b661673dc0a 100644 (file)
@@ -114,13 +114,11 @@ meta_back_search( Operation *op, SlapReply *rs )
        int isroot = 0;
        dncookie dc;
 
-#ifdef LDAP_CACHING
        cache_manager*  cm = li->cm;
 
        if (cm->caching) {
                return meta_back_cache_search(op, rs);
        }
-#endif /* LDAP_CACHING */
        
        /*
         * controls are set in ldap_back_dobind()
index e29fb64f41dba3a9d76e8106239b2f7b76bcc125..0af3f42a57c0567b12e7bc68d34a1ad783bfa71c 100644 (file)
@@ -406,7 +406,6 @@ static struct slap_schema_ad_map {
                NULL, NULL, NULL, NULL, NULL,
                offsetof(struct slap_internal_schema, si_ad_superiorUUID) },
 
-#ifdef LDAP_CACHING 
        /* LDAP cache specific operational attribute */
        { "queryid", "( 1.3.6.1.4.1.4203.666.1.12 NAME 'queryid' "
                        "DESC 'list of queries the entry belongs to' "
@@ -417,7 +416,6 @@ static struct slap_schema_ad_map {
                NULL, NULL,
                NULL, NULL, NULL, NULL, NULL, 
                offsetof(struct slap_internal_schema, si_ad_queryid) },
-#endif /* LDAP_CACHING */
 
        { "syncreplCookie", "( 1.3.6.1.4.1.4203.666.1.23 "
                        "NAME 'syncreplCookie' "
index 948145c3d74b5c4f3966b4b0e81ca1067c632daa..6c9e110b5fa32f115b7d63c38b7b99a068dde42c 100644 (file)
@@ -37,7 +37,6 @@
 #include "ldap_queue.h"
 
 #define SLAP_EXTENDED_SCHEMA 1
-#define LDAP_CACHING 1
 
 LDAP_BEGIN_DECL
 /*
@@ -735,10 +734,8 @@ struct slap_internal_schema {
        AttributeDescription *si_ad_namingCSN;
        AttributeDescription *si_ad_superiorUUID;
 
-#ifdef LDAP_CACHING
        /* LDAP cache specific operational attribute */
        AttributeDescription *si_ad_queryid;
-#endif /* LDAP_CACHING */
 
        AttributeDescription *si_ad_dseType;
        AttributeDescription *si_ad_syncreplCookie;