]> git.sur5r.net Git - openldap/commitdiff
fix known controls bug
authorKurt Zeilenga <kurt@openldap.org>
Mon, 30 Aug 2004 20:50:25 +0000 (20:50 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 30 Aug 2004 20:50:25 +0000 (20:50 +0000)
(seems odd to me that these backend know all of these controls)

servers/slapd/back-ldap/init.c
servers/slapd/back-meta/init.c

index aa426320461d626494635b481832f6b2056f57af..8217cc76d384b4d97abc48e8f8533c29c5698857 100644 (file)
@@ -46,14 +46,21 @@ int init_module(int argc, char *argv[]) {
 
 #endif /* SLAPD_LDAP */
 
+static int
+ldap_back_open(
+       BackendInfo *bi
+)
+{
+       bi->bi_controls = slap_known_controls;
+       return 0;
+}
+
 int
 ldap_back_initialize(
     BackendInfo        *bi
 )
 {
-       bi->bi_controls = slap_known_controls;
-
-       bi->bi_open = 0;
+       bi->bi_open = ldap_back_open;
        bi->bi_config = 0;
        bi->bi_close = 0;
        bi->bi_destroy = 0;
index 8ed7cb7379e5e5656b9b96cbaff5e462a8ecd389..3b3decd93fbd2a3762e9075ece47e0e9cc897795 100644 (file)
@@ -42,14 +42,21 @@ init_module( int argc, char *argv[] ) {
 
 #endif /* SLAPD_META */
 
+static int
+meta_back_open(
+       BackendInfo *bi
+)
+{
+       bi->bi_controls = slap_known_controls;
+       return 0;
+}
+
 int
 meta_back_initialize(
                BackendInfo     *bi
 )
 {
-       bi->bi_controls = slap_known_controls;
-
-       bi->bi_open = 0;
+       bi->bi_open = meta_back_open;
        bi->bi_config = 0;
        bi->bi_close = 0;
        bi->bi_destroy = 0;