From bb21f09d1fbe293f3f66cf7972174e0de736ae4b Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 26 Apr 2005 20:10:15 +0000 Subject: [PATCH] use safe(r) default --- servers/slapd/back-meta/back-meta.h | 1 + servers/slapd/back-meta/config.c | 2 -- servers/slapd/back-meta/init.c | 4 ++++ 3 files changed, 5 insertions(+), 2 deletions(-) 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; -- 2.39.5