From c0f5fad0f8488af823bc70cfe0b08c4b73d9540a Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 23 Apr 2008 10:23:00 +0000 Subject: [PATCH] For ITS#5346 - reintroduce bd_self pointer (from 2008-03-13) --- servers/slapd/back-monitor/init.c | 2 +- servers/slapd/backend.c | 1 + servers/slapd/frontend.c | 1 + servers/slapd/slap.h | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/servers/slapd/back-monitor/init.c b/servers/slapd/back-monitor/init.c index 1f82cfa9a4..3fd6cf978d 100644 --- a/servers/slapd/back-monitor/init.c +++ b/servers/slapd/back-monitor/init.c @@ -356,7 +356,7 @@ monitor_back_register_database_limbo( el.el_type = LIMBO_DATABASE; - el.el_be = be; + el.el_be = be->bd_self; el.el_ndn = ndn; for ( elpp = &mi->mi_entry_limbo; diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index 1314c10e6a..78c655cc64 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -585,6 +585,7 @@ backend_db_init( } be->bd_info = bi; + be->bd_self = be; be->be_def_limit = frontendDB->be_def_limit; be->be_dfltaccess = frontendDB->be_dfltaccess; diff --git a/servers/slapd/frontend.c b/servers/slapd/frontend.c index 63271f6882..4ab36e5a2a 100644 --- a/servers/slapd/frontend.c +++ b/servers/slapd/frontend.c @@ -93,6 +93,7 @@ frontend_init( void ) { /* data */ frontendDB = &slap_frontendDB; + frontendDB->bd_self = frontendDB; /* ACLs */ frontendDB->be_dfltaccess = ACL_READ; diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index 8507e3cc93..ada56ab419 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -1707,6 +1707,7 @@ struct ConfigOCs; /* config.h */ struct BackendDB { BackendInfo *bd_info; /* pointer to shared backend info */ + struct BackendDB *bd_self; /* pointer to this struct */ /* fields in this structure (and routines acting on this structure) should be renamed from be_ to bd_ */ -- 2.39.5