mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
do not try to register custom monitor stuff when subordinate (related to ITS#4965); note: this might not be the best solution, because it does not allow to monitor subordinate databases; however, right now it's necessary, since subodinate databases do not register themselves in back-monitor
This commit is contained in:
parent
1c4ec9ab1b
commit
133035cdd2
@ -275,6 +275,10 @@ bdb_monitor_db_init( BackendDB *be )
|
|||||||
{
|
{
|
||||||
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
|
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
|
||||||
|
|
||||||
|
if ( SLAP_GLUE_SUBORDINATE( be ) ) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if ( bdb_monitor_initialize() == LDAP_SUCCESS ) {
|
if ( bdb_monitor_initialize() == LDAP_SUCCESS ) {
|
||||||
/* monitoring in back-bdb is on by default */
|
/* monitoring in back-bdb is on by default */
|
||||||
SLAP_DBFLAGS( be ) |= SLAP_DBFLAG_MONITORING;
|
SLAP_DBFLAGS( be ) |= SLAP_DBFLAG_MONITORING;
|
||||||
@ -304,6 +308,10 @@ bdb_monitor_db_open( BackendDB *be )
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( SLAP_GLUE_SUBORDINATE( be ) ) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
mi = backend_info( "monitor" );
|
mi = backend_info( "monitor" );
|
||||||
if ( !mi || !mi->bi_extra ) {
|
if ( !mi || !mi->bi_extra ) {
|
||||||
SLAP_DBFLAGS( be ) ^= SLAP_DBFLAG_MONITORING;
|
SLAP_DBFLAGS( be ) ^= SLAP_DBFLAG_MONITORING;
|
||||||
@ -500,6 +508,10 @@ bdb_monitor_db_close( BackendDB *be )
|
|||||||
{
|
{
|
||||||
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
|
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
|
||||||
|
|
||||||
|
if ( SLAP_GLUE_SUBORDINATE( be ) ) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if ( !BER_BVISNULL( &bdb->bi_monitor.bdm_filter ) ) {
|
if ( !BER_BVISNULL( &bdb->bi_monitor.bdm_filter ) ) {
|
||||||
BackendInfo *mi = backend_info( "monitor" );
|
BackendInfo *mi = backend_info( "monitor" );
|
||||||
monitor_extra_t *mbe;
|
monitor_extra_t *mbe;
|
||||||
@ -529,5 +541,9 @@ bdb_monitor_db_close( BackendDB *be )
|
|||||||
int
|
int
|
||||||
bdb_monitor_db_destroy( BackendDB *be )
|
bdb_monitor_db_destroy( BackendDB *be )
|
||||||
{
|
{
|
||||||
|
if ( SLAP_GLUE_SUBORDINATE( be ) ) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user