/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2005 The OpenLDAP Foundation.
+ * Copyright 2005-2006 The OpenLDAP Foundation.
* Portions Copyright 2003 Howard Chu.
* All rights reserved.
*
#include "portable.h"
-#ifdef LDAP_DEVEL
-
#include <stdio.h>
#include <ac/string.h>
#include <ac/socket.h>
#include "slap.h"
+
+#ifdef SLAP_DISTPROC
+
#include "back-ldap.h"
#include "config.h"
"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
{ "distproc-cache-uri", "TRUE/FALSE",
2, 2, 0, ARG_MAGIC|ARG_ON_OFF|DP_CACHE_URI, distproc_cfgen,
- "( OLcfgOvAt:3.2 NAME 'olcCacheURI' "
+ "( OLcfgOvAt:3.2 NAME 'olcChainCacheURI' "
"DESC 'Enables caching of URIs not present in configuration' "
- "SYNTAX OMsBoolean SINGLE-VALUE )", NULL, NULL },
+ "SYNTAX OMsBoolean "
+ "SINGLE-VALUE )", NULL, NULL },
{ NULL, NULL, 0, 0, 0, ARG_IGNORED }
};
"SUP olcOverlayConfig "
"MAY ( "
"olcChainingBehavior $ "
- "olcCacheURI "
+ "olcChainCacheURI "
") )",
Cft_Overlay, distproc_cfg, NULL, distproc_cfadd },
{ "( OLcfgOvOc:7.2 "
return 1;
}
memset( lc, 0, sizeof( ldap_distproc_t ) );
+ ldap_pvt_thread_mutex_init( &lc->lc_lai.lai_mutex );
on->on_bi.bi_private = (void *)lc;
if ( lc ) {
avl_free( lc->lc_lai.lai_tree, NULL );
+ ldap_pvt_thread_mutex_destroy( &lc->lc_lai.lai_mutex );
ch_free( lc );
}
BackendInfo *bi = be->bd_info;
ldapinfo_t *li;
- int t;
+ slap_op_t t;
be->bd_info = lback;
be->be_private = NULL;
li->li_nretries = lc->lc_common_li->li_nretries;
li->li_flags = lc->lc_common_li->li_flags;
li->li_version = lc->lc_common_li->li_version;
- for ( t = 0; t < LDAP_BACK_OP_LAST; t++ ) {
+ for ( t = 0; t < SLAP_OP_LAST; t++ ) {
li->li_timeout[ t ] = lc->lc_common_li->li_timeout[ t ];
}
be->bd_info = bi;
return rc;
}
+#ifdef LDAP_DEVEL
rc = supported_feature_load( &slap_FEATURE_CANCHAINOPS );
if ( rc != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_ANY, "slapd-distproc: "
rc, 0, 0 );
return rc;
}
+#endif
rc = register_supported_control( LDAP_CONTROL_X_RETURNCONTREF,
SLAP_CTRL_GLOBAL|SLAP_CTRL_ACCESS|SLAP_CTRL_HIDE, NULL,
return overlay_register( &distproc );
}
-#endif /* LDAP_DEVEL */
+#endif /* SLAP_DISTPROC */