]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/frontend.c
Sync with HEAD
[openldap] / servers / slapd / frontend.c
index 0aedfc0e849eb4348977e879b56e17054ebb58e8..bf9635b8755a659ef468f279e7d15a0f71b24d08 100644 (file)
@@ -1,7 +1,7 @@
 /* frontend.c - routines for dealing with frontend */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2004 The OpenLDAP Foundation.
+ * Copyright 1998-2005 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,8 +42,8 @@
 #include "slapi/slapi.h"
 #endif
 
-BackendInfo    slap_frontendInfo;
-BackendDB      slap_frontendDB;
+static BackendInfo     slap_frontendInfo;
+static BackendDB       slap_frontendDB;
 BackendDB      *frontendDB;
 
 int
@@ -65,6 +65,12 @@ frontend_init( void )
        frontendDB->be_def_limit.lms_s_pr_hide = 0;                     /* don't hide number of entries left */
        frontendDB->be_def_limit.lms_s_pr_total = 0;                    /* number of total entries returned by pagedResults equal to hard limit */
 
+#if 0
+       /* FIXME: do we need this? */
+       frontendDB->be_pcl_mutexp = &frontendDB->be_pcl_mutex;
+       ldap_pvt_thread_mutex_init( frontendDB->be_pcl_mutexp );
+#endif
+
        /* suffix */
        frontendDB->be_suffix = ch_calloc( 2, sizeof( struct berval ) );
        ber_str2bv( "", 0, 1, &frontendDB->be_suffix[0] );
@@ -81,8 +87,10 @@ frontend_init( void )
 
        /* known controls */
        frontendDB->bd_info->bi_controls = slap_known_controls;
+       frontendDB->be_controls = ldap_charray_dup( slap_known_controls );
 
        /* calls */
+       frontendDB->bd_info->bi_op_abandon = fe_op_abandon;
        frontendDB->bd_info->bi_op_add = fe_op_add;
        frontendDB->bd_info->bi_op_bind = fe_op_bind;
        frontendDB->bd_info->bi_op_compare = fe_op_compare;
@@ -92,6 +100,11 @@ frontend_init( void )
        frontendDB->bd_info->bi_op_search = fe_op_search;
        frontendDB->bd_info->bi_extended = fe_extended;
 
+#if 0
+       /* FIXME: is this too early? */
+       return backend_startup_one( frontendDB );
+#endif
+
        return 0;
 }