From: Pierangelo Masarati Date: Fri, 8 Sep 2006 22:10:49 +0000 (+0000) Subject: cleanup names X-Git-Tag: OPENLDAP_REL_ENG_2_3_MP~185 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4350ce51898def8317b0172fa2532c4312e33564;p=openldap cleanup names --- diff --git a/servers/slapd/back-bdb/back-bdb.h b/servers/slapd/back-bdb/back-bdb.h index f1e8e31498..4db9b13572 100644 --- a/servers/slapd/back-bdb/back-bdb.h +++ b/servers/slapd/back-bdb/back-bdb.h @@ -150,12 +150,12 @@ struct bdb_db_info { DB *bdi_db; }; -typedef struct bdb_monitor_cleanup_t { +typedef struct bdb_monitor_t { void *bdm_cb; - struct berval bdm_base; + struct berval bdm_nbase; int bdm_scope; struct berval bdm_filter; -} bdb_monitor_cleanup_t; +} bdb_monitor_t; /* From ldap_rq.h */ struct re_s; @@ -203,7 +203,7 @@ struct bdb_info { alock_info_t bi_alock_info; char *bi_db_config_path; BerVarray bi_db_config; - bdb_monitor_cleanup_t bi_monitor_cleanup; + bdb_monitor_t bi_monitor; int bi_flags; #define BDB_IS_OPEN 0x01 #define BDB_HAS_CONFIG 0x02 diff --git a/servers/slapd/back-bdb/monitor.c b/servers/slapd/back-bdb/monitor.c index 7901a8361e..734e6e2b3e 100644 --- a/servers/slapd/back-bdb/monitor.c +++ b/servers/slapd/back-bdb/monitor.c @@ -368,10 +368,10 @@ bdb_monitor_open( BackendDB *be ) * base="cn=Databases,cn=Monitor", scope=LDAP_SCOPE_ONE * and filter="(namingContexts:distinguishedNameMatch:=)" */ - bdb->bi_monitor_cleanup.bdm_scope = LDAP_SCOPE_ONELEVEL; - base = &bdb->bi_monitor_cleanup.bdm_base; + bdb->bi_monitor.bdm_scope = LDAP_SCOPE_ONELEVEL; + base = &bdb->bi_monitor.bdm_nbase; BER_BVSTR( base, "cn=databases,cn=monitor" ); - filter = &bdb->bi_monitor_cleanup.bdm_filter; + filter = &bdb->bi_monitor.bdm_filter; BER_BVZERO( filter ); suffix.bv_len = ldap_bv2escaped_filter_value_len( &be->be_nsuffix[ 0 ] ); @@ -504,7 +504,7 @@ cleanup:; } /* store for cleanup */ - bdb->bi_monitor_cleanup.bdm_cb = (void *)cb; + bdb->bi_monitor.bdm_cb = (void *)cb; /* we don't need to keep track of the attributes, because * bdb_monitor_free() takes care of everything */ @@ -523,18 +523,18 @@ bdb_monitor_close( BackendDB *be ) { struct bdb_info *bdb = (struct bdb_info *) be->be_private; - if ( !BER_BVISNULL( &bdb->bi_monitor_cleanup.bdm_filter ) ) { + if ( !BER_BVISNULL( &bdb->bi_monitor.bdm_filter ) ) { monitor_back_unregister_entry_callback( NULL, - (monitor_callback_t *)bdb->bi_monitor_cleanup.bdm_cb, - &bdb->bi_monitor_cleanup.bdm_base, - bdb->bi_monitor_cleanup.bdm_scope, - &bdb->bi_monitor_cleanup.bdm_filter ); + (monitor_callback_t *)bdb->bi_monitor.bdm_cb, + &bdb->bi_monitor.bdm_nbase, + bdb->bi_monitor.bdm_scope, + &bdb->bi_monitor.bdm_filter ); - if ( !BER_BVISNULL( &bdb->bi_monitor_cleanup.bdm_filter ) ) { - ch_free( bdb->bi_monitor_cleanup.bdm_filter.bv_val ); + if ( !BER_BVISNULL( &bdb->bi_monitor.bdm_filter ) ) { + ch_free( bdb->bi_monitor.bdm_filter.bv_val ); } - memset( &bdb->bi_monitor_cleanup, 0, sizeof( bdb->bi_monitor_cleanup ) ); + memset( &bdb->bi_monitor, 0, sizeof( bdb->bi_monitor ) ); } return 0;