X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fback-meta%2Fconn.c;h=c3bda0d970c9ff6e38977ac2f282516a390734f7;hb=6984ac6a50f9eadac605bf4fc7d55e802eca1772;hp=4c50f4b9759dbcdcb5845a2d01bd81d327f163a7;hpb=f9e9e0c9dd138b925ff581b6b9d7021e4a828416;p=openldap diff --git a/servers/slapd/back-meta/conn.c b/servers/slapd/back-meta/conn.c index 4c50f4b975..c3bda0d970 100644 --- a/servers/slapd/back-meta/conn.c +++ b/servers/slapd/back-meta/conn.c @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1999-2012 The OpenLDAP Foundation. + * Copyright 1999-2013 The OpenLDAP Foundation. * Portions Copyright 2001-2003 Pierangelo Masarati. * Portions Copyright 1999-2003 Howard Chu. * All rights reserved. @@ -421,6 +421,8 @@ retry_lock:; ldap_set_option( msc->msc_ld, LDAP_OPT_REFERRALS, META_BACK_TGT_CHASE_REFERRALS( mt ) ? LDAP_OPT_ON : LDAP_OPT_OFF ); + slap_client_keepalive(msc->msc_ld, &mt->mt_tls.sb_keepalive); + #ifdef HAVE_TLS if ( !is_ldaps ) { slap_bindconf *sb = NULL; @@ -762,6 +764,7 @@ meta_back_retry( if ( rc == LDAP_SUCCESS ) { quarantine = 0; + LDAP_BACK_CONN_BINDING_SET( msc ); binding = 1; rc = meta_back_single_dobind( op, rs, mcp, candidate, sendok, mt->mt_nretries, 0 ); @@ -784,10 +787,12 @@ meta_back_retry( LDAP_BACK_CONN_BINDING_CLEAR( msc ); } } - } + } +#if 0 /* ITS#7591, following stmt drops needed result msgs */ /* don't send twice */ sendok &= ~LDAP_BACK_SENDERR; +#endif } if ( rc != LDAP_SUCCESS ) { @@ -1179,8 +1184,8 @@ retry_lock:; mc = NULL; } else { - if ( ( mi->mi_conn_ttl != 0 && op->o_time > mc->mc_create_time + mi->mi_conn_ttl ) - || ( mi->mi_idle_timeout != 0 && op->o_time > mc->mc_time + mi->mi_idle_timeout ) ) + if ( mc->mc_refcnt == 0 && (( mi->mi_conn_ttl != 0 && op->o_time > mc->mc_create_time + mi->mi_conn_ttl ) + || ( mi->mi_idle_timeout != 0 && op->o_time > mc->mc_time + mi->mi_idle_timeout )) ) { #if META_BACK_PRINT_CONNTREE > 0 meta_back_print_conntree( mi,