From: Pierangelo Masarati Date: Tue, 26 Apr 2005 20:10:15 +0000 (+0000) Subject: use safe(r) default X-Git-Tag: OPENLDAP_AC_BP~786 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bb21f09d1fbe293f3f66cf7972174e0de736ae4b;p=openldap use safe(r) default --- diff --git a/servers/slapd/back-meta/back-meta.h b/servers/slapd/back-meta/back-meta.h index 7d4d91490a..7b74ae9230 100644 --- a/servers/slapd/back-meta/back-meta.h +++ b/servers/slapd/back-meta/back-meta.h @@ -202,6 +202,7 @@ typedef struct metatarget_t { #define META_RETRY_UNDEFINED (-2) #define META_RETRY_FOREVER (-1) #define META_RETRY_NEVER (0) +#define META_RETRY_DEFAULT (3) struct ldaprwmap mt_rwmap; } metatarget_t; diff --git a/servers/slapd/back-meta/config.c b/servers/slapd/back-meta/config.c index 6281f37c7b..777eee643c 100644 --- a/servers/slapd/back-meta/config.c +++ b/servers/slapd/back-meta/config.c @@ -75,8 +75,6 @@ new_target( void ) ldap_back_map_init( &mt->mt_rwmap.rwm_at, &mapping ); - mt->mt_nretries = META_RETRY_UNDEFINED; - return mt; } diff --git a/servers/slapd/back-meta/init.c b/servers/slapd/back-meta/init.c index 1982683edb..b7cacb6243 100644 --- a/servers/slapd/back-meta/init.c +++ b/servers/slapd/back-meta/init.c @@ -89,6 +89,10 @@ meta_back_db_init( ldap_pvt_thread_mutex_init( &mi->mi_conn_mutex ); ldap_pvt_thread_mutex_init( &mi->mi_cache.mutex ); + + /* safe default */ + mi->mi_nretries = META_RETRY_DEFAULT; + be->be_private = mi; return 0;