]> git.sur5r.net Git - openldap/commitdiff
use keepalive stuff when connecting as a client via bindconf (second part of ITS...
authorPierangelo Masarati <ando@openldap.org>
Sun, 22 Nov 2009 13:05:58 +0000 (13:05 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sun, 22 Nov 2009 13:05:58 +0000 (13:05 +0000)
servers/slapd/config.c

index fed35cf8f049fff80a12f34280ff6ad706dfb320..ad4bec98e5b4926a1bc199b7c437ef437314ed5e 100644 (file)
@@ -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 );