/* 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
#include "slapi/slapi.h"
#endif
-BackendInfo slap_frontendInfo;
-BackendDB slap_frontendDB;
+static BackendInfo slap_frontendInfo;
+static BackendDB slap_frontendDB;
BackendDB *frontendDB;
int
/* FIXME: do we need this? */
frontendDB->be_pcl_mutexp = &frontendDB->be_pcl_mutex;
ldap_pvt_thread_mutex_init( frontendDB->be_pcl_mutexp );
-
- LDAP_STAILQ_INIT( &frontendDB->be_syncinfo );
#endif
/* suffix */
frontendDB->bd_info->bi_type = "frontend";
/* known controls */
- frontendDB->bd_info->bi_controls = slap_known_controls;
+ if ( slap_known_controls ) {
+ int i;
+
+ frontendDB->bd_info->bi_controls = slap_known_controls;
+
+ for ( i = 0; slap_known_controls[ i ]; i++ ) {
+ int cid;
+
+ if ( slap_find_control_id( slap_known_controls[ i ], &cid )
+ == LDAP_CONTROL_NOT_FOUND )
+ {
+ assert( 0 );
+ return -1;
+ }
+
+ frontendDB->bd_info->bi_ctrls[ cid ] = 1;
+ frontendDB->be_ctrls[ cid ] = 1;
+ }
+ }
/* calls */
frontendDB->bd_info->bi_op_abandon = fe_op_abandon;