From d262aae706cb191be06adfcb203c5998952f65f1 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 17 Nov 2001 14:09:38 +0000 Subject: [PATCH] fix misinitialized UNDEFINED attribute type; reordered members of AttributeType because I don't know a portable way to statically initialize a mutex :) --- servers/slapd/schema_prep.c | 6 ++++-- servers/slapd/slap.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/servers/slapd/schema_prep.c b/servers/slapd/schema_prep.c index 4ba2607d84..9ae8843b22 100644 --- a/servers/slapd/schema_prep.c +++ b/servers/slapd/schema_prep.c @@ -217,15 +217,17 @@ struct slap_schema_ad_map { }; static AttributeType slap_at_undefined = { - "UNDEFINED", /* cname */ { "1.1.1", NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, - 0, 0, 0, 1, 3 }, + 0, 0, 0, 1, 3 }, /* LDAPAttributeType */ + { sizeof( "UNDEFINED" ) - 1, "UNDEFINED" }, /* cname */ NULL, /* sup */ NULL, /* subtypes */ NULL, NULL, NULL, NULL, /* matching rules */ NULL, /* syntax (this may need to be defined) */ + NULL, /* attribute description */ NULL /* next */ + /* mutex (don't know how to initialize it :) */ }; struct slap_schema_mr_map { diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index b3e115f085..9ebe047e77 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -378,9 +378,9 @@ typedef struct slap_attribute_type { MatchingRule *sat_ordering; MatchingRule *sat_substr; Syntax *sat_syntax; - ldap_pvt_thread_mutex_t sat_ad_mutex; struct slap_attr_desc *sat_ad; struct slap_attribute_type *sat_next; + ldap_pvt_thread_mutex_t sat_ad_mutex; #define sat_oid sat_atype.at_oid #define sat_names sat_atype.at_names #define sat_desc sat_atype.at_desc -- 2.39.5