fix uninit'ed parameters to monitor_back_register_entry_attrs()

This commit is contained in:
Pierangelo Masarati 2012-04-04 15:07:37 +02:00
parent 04c44f016c
commit ce54dabb1b
5 changed files with 8 additions and 7 deletions

View File

@ -339,7 +339,6 @@ bdb_monitor_db_open( BackendDB *be )
int rc = 0;
BackendInfo *mi;
monitor_extra_t *mbe;
struct berval dummy = BER_BVC("");
if ( !SLAP_DBMONITORING( be ) ) {
return 0;
@ -456,7 +455,7 @@ bdb_monitor_db_open( BackendDB *be )
rc = mbe->register_database( be, &bdb->bi_monitor.bdm_ndn );
if ( rc == 0 ) {
rc = mbe->register_entry_attrs( &bdb->bi_monitor.bdm_ndn, a, cb,
&dummy, 0, &dummy );
NULL, 0, NULL );
}
cleanup:;

View File

@ -655,7 +655,7 @@ ldap_back_monitor_conn_init(
cb->mc_free = ldap_back_monitor_free;
cb->mc_private = (void *)li;
rc = mbe->register_entry_attrs( &ms->mss_ndn, a, cb, NULL, 0, NULL );
rc = mbe->register_entry_attrs( &ms->mss_ndn, a, cb, NULL, -1, NULL );
attr_free( a->a_next );
attr_free( a );

View File

@ -286,7 +286,6 @@ mdb_monitor_db_open( BackendDB *be )
int rc = 0;
BackendInfo *mi;
monitor_extra_t *mbe;
struct berval dummy = BER_BVC("");
if ( !SLAP_DBMONITORING( be ) ) {
return 0;
@ -387,7 +386,7 @@ mdb_monitor_db_open( BackendDB *be )
rc = mbe->register_database( be, &mdb->mi_monitor.mdm_ndn );
if ( rc == 0 ) {
rc = mbe->register_entry_attrs( &mdb->mi_monitor.mdm_ndn, a, cb,
&dummy, 0, &dummy );
NULL, -1, NULL );
}
cleanup:;

View File

@ -941,6 +941,10 @@ monitor_back_register_entry_attrs(
monitor_info_t *mi;
struct berval ndn = BER_BVNULL;
char *fname = ( a == NULL ? "callback" : "attrs" );
struct berval empty_bv = BER_BVC("");
if ( nbase == NULL ) nbase = &empty_bv;
if ( filter == NULL ) filter = &empty_bv;
if ( be_monitor == NULL ) {
char buf[ SLAP_TEXT_BUFLEN ];

View File

@ -5520,7 +5520,6 @@ pcache_monitor_db_open( BackendDB *be )
int rc = 0;
BackendInfo *mi;
monitor_extra_t *mbe;
struct berval dummy = BER_BVC( "" );
if ( !SLAP_DBMONITORING( be ) ) {
return 0;
@ -5580,7 +5579,7 @@ pcache_monitor_db_open( BackendDB *be )
rc = mbe->register_overlay( be, on, &cm->monitor_ndn );
if ( rc == 0 ) {
rc = mbe->register_entry_attrs( &cm->monitor_ndn, a, cb,
&dummy, -1, &dummy);
NULL, -1, NULL);
}
cleanup:;