From: Pierangelo Masarati Date: Sun, 22 Nov 2009 13:05:58 +0000 (+0000) Subject: use keepalive stuff when connecting as a client via bindconf (second part of ITS... X-Git-Tag: ACLCHECK_0~68 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f59337655ea90ac5ebbcaab3618460255dc95a80;p=openldap use keepalive stuff when connecting as a client via bindconf (second part of ITS#6389) --- diff --git a/servers/slapd/config.c b/servers/slapd/config.c index fed35cf8f0..ad4bec98e5 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -1852,6 +1852,18 @@ slap_client_connect( LDAP **ldp, slap_bindconf *sb ) ldap_set_option( ld, LDAP_OPT_NETWORK_TIMEOUT, &tv ); } + if ( sb->sb_keepalive.sk_idle ) { + ldap_set_option( ld, LDAP_OPT_X_KEEPALIVE_IDLE, &sb->sb_keepalive.sk_idle ); + } + + if ( sb->sb_keepalive.sk_probes ) { + ldap_set_option( ld, LDAP_OPT_X_KEEPALIVE_PROBES, &sb->sb_keepalive.sk_probes ); + } + + if ( sb->sb_keepalive.sk_interval ) { + ldap_set_option( ld, LDAP_OPT_X_KEEPALIVE_INTERVAL, &sb->sb_keepalive.sk_interval ); + } + #ifdef HAVE_TLS if ( sb->sb_tls_do_init ) { rc = bindconf_tls_set( sb, ld );