unifdef LDAP_CACHING

This commit is contained in:
Jong Hyuk Choi 2003-08-27 23:21:17 +00:00
parent ec9e19a573
commit 9760933c20
14 changed files with 0 additions and 40 deletions

View 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;

View 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

View 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 */

View 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

View 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 */

View File

@ -104,7 +104,6 @@
#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

View 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

View 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 */

View 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

View 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"

View 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 );

View 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()

View 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' "

View 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;