]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/slap.h
Free IDL_CACHE locks
[openldap] / servers / slapd / slap.h
index 168cf296db3b755dffb540cadf95966b410634bb..19f67952a5ecfe865fa0a24b6535f086e0f1855b 100644 (file)
@@ -36,8 +36,6 @@
 #include "ldap_queue.h"
 
 #ifdef LDAP_DEVEL
-#define SLAP_NVALUES 1
-#define SLAP_NVALUES_ON_DISK 1
 #define SLAP_EXTENDED_SCHEMA 1
 #define LDAP_CACHING
 #endif
@@ -294,7 +292,8 @@ typedef int slap_syntax_validate_func LDAP_P((
 typedef int slap_syntax_transform_func LDAP_P((
        struct slap_syntax *syntax,
        struct berval * in,
-       struct berval * out));
+       struct berval * out,
+       void *memctx));
 
 typedef struct slap_syntax {
        LDAPSyntax                      ssyn_syn;
@@ -321,9 +320,6 @@ typedef struct slap_syntax {
 #define SLAP_SYNTAX_HIDE       0x8000U /* hide (do not publish) */
 
        slap_syntax_validate_func       *ssyn_validate;
-#ifndef SLAP_NVALUES
-       slap_syntax_transform_func      *ssyn_normalize;
-#endif
        slap_syntax_transform_func      *ssyn_pretty;
 
 #ifdef SLAPD_BINARY_CONVERSION
@@ -345,11 +341,6 @@ typedef struct slap_syntax_defs_rec {
        char *sd_desc;
        int sd_flags;
        slap_syntax_validate_func *sd_validate;
-#ifdef SLAP_NVALUES
-       slap_syntax_transform_func *sd_normalizeXXX; /* to be deleted */
-#else
-       slap_syntax_transform_func *sd_normalize;
-#endif
        slap_syntax_transform_func *sd_pretty;
 #ifdef SLAPD_BINARY_CONVERSION
        slap_syntax_transform_func *sd_ber2str;
@@ -360,7 +351,8 @@ typedef struct slap_syntax_defs_rec {
 /* X -> Y Converter */
 typedef int slap_mr_convert_func LDAP_P((
        struct berval * in,
-       struct berval * out ));
+       struct berval * out,
+       void *memctx ));
 
 /* Normalizer */
 typedef int slap_mr_normalize_func LDAP_P((
@@ -368,7 +360,8 @@ typedef int slap_mr_normalize_func LDAP_P((
        struct slap_syntax *syntax, /* NULL if in is asserted value */
        struct slap_matching_rule *mr,
        struct berval * in,
-       struct berval * out ));
+       struct berval * out,
+       void *memctx ));
 
 /* Match (compare) function */
 typedef int slap_mr_match_func LDAP_P((
@@ -387,7 +380,8 @@ typedef int slap_mr_indexer_func LDAP_P((
        struct slap_matching_rule *mr,
        struct berval *prefix,
        BerVarray values,
-       BerVarray *keys ));
+       BerVarray *keys,
+       void *memctx ));
 
 /* Filter index function */
 typedef int slap_mr_filter_func LDAP_P((
@@ -397,7 +391,8 @@ typedef int slap_mr_filter_func LDAP_P((
        struct slap_matching_rule *mr,
        struct berval *prefix,
        void * assertValue,
-       BerVarray *keys ));
+       BerVarray *keys,
+       void *memctx ));
 
 typedef struct slap_matching_rule_use MatchingRuleUse;
 
@@ -437,29 +432,7 @@ typedef struct slap_matching_rule {
 #define SLAP_MR_SUBSTR_ANY             ( SLAP_MR_SUBSTR | 0x0200U )
 #define SLAP_MR_SUBSTR_FINAL   ( SLAP_MR_SUBSTR | 0x0400U )
 
-#ifndef SLAP_NVALUES
-#define SLAP_MR_DN_FOLD                        0x0080U
-#endif
-
-#ifndef SLAP_NVALUES
-/*
- * normally the asserted value is expected to conform to
- * assertion syntax specified in the matching rule, however
- * at times (such as during individual value modification),
- * the asserted value is expected to conform to the
- * attribute's value syntax.
- */
-#define SLAP_MR_ASSERTION_SYNTAX_MATCH         0x0000U
-#define SLAP_MR_ATTRIBUTE_SYNTAX_MATCH         0x0001U
-
-/* For SLAP_MR_ATTRIBUTE_SYNTAX_MATCHes, this flag indicates
- * that the asserted value of the attribute syntax has been
- * converted to the assertion syntax.  (Not sure why we just
- * don't clear the SLAP_MR_ATTRIBUTE_SYNTAX_MATCH flag instead.)
- */
-#define SLAP_MR_ATTRIBUTE_SYNTAX_CONVERTED_MATCH       0x0002U
 
-#else
 /*
  * The asserted value, depending on the particular usage,
  * is expected to conform to either the assertion syntax
@@ -478,7 +451,6 @@ typedef struct slap_matching_rule {
        ((usage) & SLAP_MR_VALUE_OF_ATTRIBUTE_SYNTAX )
 #define SLAP_MR_IS_VALUE_OF_ASSERTION_SYNTAX( usage ) \
        ((usage) & SLAP_MR_VALUE_OF_ASSERTION_SYNTAX )
-#endif
 
 /* either or both the asserted value or attribute value
  * may be provided in normalized form
@@ -714,7 +686,6 @@ struct slap_internal_schema {
        ObjectClass *si_oc_rootdse;
        ObjectClass *si_oc_subentry;
        ObjectClass *si_oc_subschema;
-       ObjectClass *si_oc_monitor;
        ObjectClass *si_oc_collectiveAttributeSubentry;
        ObjectClass *si_oc_dynamicObject;
 
@@ -795,7 +766,7 @@ struct slap_internal_schema {
 #ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
        AttributeDescription *si_ad_krbName;
 #endif
-
+        
        /* Undefined Attribute Type */
        AttributeType   *si_at_undefined;
 
@@ -948,9 +919,7 @@ typedef struct slap_valuesreturnfilter {
 typedef struct slap_attr {
        AttributeDescription *a_desc;
        BerVarray       a_vals;         /* preserved values */
-#ifdef SLAP_NVALUES
        BerVarray       a_nvals;        /* normalized values */
-#endif
        struct slap_attr *a_next;
        unsigned a_flags;
 #define SLAP_ATTR_IXADD                0x1U
@@ -1001,9 +970,7 @@ typedef struct slap_mod {
        struct berval sm_type;
        BerVarray sm_values;
 #define sm_bvalues sm_values
-#ifdef SLAP_NVALUES
        BerVarray sm_nvalues;
-#endif
 } Modification;
 
 typedef struct slap_mod_list {
@@ -1876,6 +1843,12 @@ typedef struct slap_op {
        LDAPControl     **o_ctrls;       /* controls */
 
        void    *o_threadctx;           /* thread pool thread context */
+       void    *o_tmpmemctx;           /* slab malloc context */
+       BerMemoryFunctions *o_tmpmfuncs;
+#define        o_tmpalloc      o_tmpmfuncs->bmf_malloc
+#define o_tmpcalloc    o_tmpmfuncs->bmf_calloc
+#define        o_tmprealloc    o_tmpmfuncs->bmf_realloc
+#define        o_tmpfree       o_tmpmfuncs->bmf_free
        void    *o_private;     /* anything the backend needs */
 
        LDAP_STAILQ_ENTRY(slap_op)      o_next; /* next operation in list         */