goto done;
}
+ if ( b->b_retry_timeout < 0 ) {
+ Debug( LDAP_DEBUG_ANY, "config_backend: "
+ "invalid retry timeout configuration\n" );
+ rc = -1;
+ goto done;
+ }
+ b->b_retry_tv.tv_sec = b->b_retry_timeout / 1000;
+ b->b_retry_tv.tv_usec = ( b->b_retry_timeout % 1000 ) * 1000;
+
if ( BER_BVISNULL( &b->b_bindconf.sb_uri ) ) {
Debug( LDAP_DEBUG_ANY, "config_backend: "
"backend address not specified\n" );
{ BER_BVC("numconns="), offsetof(Backend, b_numconns), 'i', 0, NULL },
{ BER_BVC("bindconns="), offsetof(Backend, b_numbindconns), 'i', 0, NULL },
+ { BER_BVC("retry="), offsetof(Backend, b_retry_timeout), 'i', 0, NULL },
#ifdef HAVE_TLS
{ BER_BVC("starttls="), offsetof(Backend, b_bindconf.sb_tls), 'i', 0, tlskey },
{ BER_BVC("tls_cert="), offsetof(Backend, b_bindconf.sb_tls_cert), 's', 1, NULL },
enum lload_tls_type b_tls;
char *b_host;
+ int b_retry_timeout, b_failed;
+ struct event *b_retry_event;
+ struct timeval b_retry_tv;
+
int b_numconns, b_numbindconns;
int b_bindavail, b_active, b_opening;
LDAP_LIST_HEAD(ConnSt, Connection) b_conns, b_bindconns;
{
Backend *b = c->c_private;
- Debug( LDAP_DEBUG_CONNS, "upstream_destroy: freeing connection %lu\n",
+ Debug( LDAP_DEBUG_CONNS, "upstream_destroy: "
+ "freeing connection %lu\n",
c->c_connid );
assert( c->c_state != SLAP_C_INVALID );