Commit 9f2aa5ec authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Misc tweaks from HEAD

parent 53c70cfe
#! /bin/sh
# $OpenLDAP$
# from OpenLDAP: pkg/ldap/configure.in,v 1.408.2.30 2003/02/10 19:24:24 kurt Exp
# from OpenLDAP: pkg/ldap/configure.in,v 1.408.2.31 2003/02/15 19:17:36 kurt Exp
 
# Copyright 1998-2003 The OpenLDAP Foundation. All Rights Reserved.
#
......
......@@ -20,7 +20,7 @@
int ldap_parse_passwd(
LDAP *ld,
LDAPMessage *res,
struct berval **newpasswd )
struct berval *newpasswd )
{
int rc;
char *retoid = NULL;
......@@ -31,7 +31,8 @@ int ldap_parse_passwd(
assert( res != NULL );
assert( newpasswd != NULL );
*newpasswd = NULL;
newpasswd->bv_val = NULL;
newpasswd->bv_len = 0;
rc = ldap_parse_extended_result( ld, res, &retoid, &retdata, 0 );
......@@ -90,17 +91,17 @@ ldap_passwd( LDAP *ld,
ber_printf( ber, "{" /*}*/ );
if( user != NULL ) {
ber_printf( ber, "ts",
ber_printf( ber, "tO",
LDAP_TAG_EXOP_MODIFY_PASSWD_ID, user );
}
if( oldpw != NULL ) {
ber_printf( ber, "ts",
ber_printf( ber, "tO",
LDAP_TAG_EXOP_MODIFY_PASSWD_OLD, oldpw );
}
if( newpw != NULL ) {
ber_printf( ber, "ts",
ber_printf( ber, "tO",
LDAP_TAG_EXOP_MODIFY_PASSWD_NEW, newpw );
}
......@@ -129,7 +130,7 @@ ldap_passwd_s(
struct berval *user,
struct berval *oldpw,
struct berval *newpw,
struct berval **newpasswd,
struct berval *newpasswd,
LDAPControl **sctrls,
LDAPControl **cctrls )
{
......
......@@ -214,7 +214,9 @@ ldap_pvt_thread_pool_submit (
LDAP_STAILQ_INSERT_TAIL(&pool->ltp_pending_list, ctx, ltc_next.q);
ldap_pvt_thread_cond_signal(&pool->ltp_cond);
if ((pool->ltp_open_count <= 0
#if 0
|| pool->ltp_pending_count > 1
#endif
|| pool->ltp_open_count == pool->ltp_active_count)
&& (pool->ltp_max_count <= 0
|| pool->ltp_open_count < pool->ltp_max_count))
......@@ -346,14 +348,8 @@ ldap_pvt_thread_pool_destroy ( ldap_pvt_thread_pool_t *tpool, int run_pending )
pool->ltp_state = run_pending
? LDAP_INT_THREAD_POOL_FINISHING
: LDAP_INT_THREAD_POOL_STOPPING;
waiting = pool->ltp_open_count;
/* broadcast could be used here, but only after
* it is fixed in the NT thread implementation
*/
while (--waiting >= 0) {
ldap_pvt_thread_cond_signal(&pool->ltp_cond);
}
ldap_pvt_thread_cond_broadcast(&pool->ltp_cond);
ldap_pvt_thread_mutex_unlock(&pool->ltp_mutex);
do {
......@@ -437,7 +433,10 @@ ldap_int_thread_pool_wrapper (
ctx->ltc_start_routine(ctx, ctx->ltc_arg);
ldap_pvt_thread_mutex_lock(&pool->ltp_mutex);
LDAP_SLIST_REMOVE(&pool->ltp_active_list, ctx,
ldap_int_thread_ctx_s, ltc_next.al);
LDAP_SLIST_INSERT_HEAD(&pool->ltp_free_list, ctx, ltc_next.l);
pool->ltp_active_count--;
ldap_pvt_thread_mutex_unlock(&pool->ltp_mutex);
ldap_pvt_thread_yield();
......@@ -447,11 +446,6 @@ ldap_int_thread_pool_wrapper (
*/
ldap_pvt_thread_mutex_lock(&pool->ltp_mutex);
pool->ltp_active_count--;
ctx = LDAP_SLIST_FIRST(&pool->ltp_active_list);
if (ctx) {
LDAP_SLIST_REMOVE_HEAD(&pool->ltp_active_list, ltc_next.al);
}
}
pool->ltp_open_count--;
......
......@@ -2545,5 +2545,7 @@ config_destroy( )
free ( slapd_args_file );
if ( slapd_pid_file )
free ( slapd_pid_file );
if ( default_passwd_hash )
free( default_passwd_hash );
acl_destroy( global_acl, NULL );
}
......@@ -74,7 +74,7 @@ LDAP_BEGIN_DECL
#define MAXREMATCHES (100)
#define SLAP_MAX_WORKER_THREADS (32)
#define SLAP_MAX_WORKER_THREADS (16)
#define SLAP_SB_MAX_INCOMING_DEFAULT ((1<<18) - 1)
#define SLAP_SB_MAX_INCOMING_AUTH ((1<<24) - 1)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment