SLAP_NVALUES back-monitor temporary hack

This commit is contained in:
Kurt Zeilenga 2003-02-25 21:19:42 +00:00
parent 71ca4d51f1
commit 2a8dec95ba
11 changed files with 36 additions and 31 deletions

View file

@ -110,8 +110,8 @@ monitor_subsys_backend_init(
bv[0].bv_len = strlen( bv[0].bv_val );
bv[1].bv_val = NULL;
attr_merge( e, monitor_ad_desc, bv );
attr_merge( e_backend, monitor_ad_desc, bv );
attr_mergeit( e, monitor_ad_desc, bv );
attr_mergeit( e_backend, monitor_ad_desc, bv );
if ( bi->bi_controls ) {
int j;
@ -119,7 +119,7 @@ monitor_subsys_backend_init(
for ( j = 0; bi->bi_controls[ j ]; j++ ) {
bv[0].bv_val = bi->bi_controls[ j ];
bv[0].bv_len = strlen( bv[0].bv_val );
attr_merge( e, slap_schema.si_ad_supportedControl, bv );
attr_mergeit( e, slap_schema.si_ad_supportedControl, bv );
}
}

View file

@ -105,7 +105,7 @@ monitor_subsys_conn_init(
bv[1].bv_val = NULL;
bv[0].bv_val = "0";
bv[0].bv_len = 1;
attr_merge( e, monitor_ad_desc, bv );
attr_mergeit( e, monitor_ad_desc, bv );
mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
e->e_private = ( void * )mp;
@ -163,7 +163,7 @@ monitor_subsys_conn_init(
bv[1].bv_val = NULL;
bv[0].bv_val = "0";
bv[0].bv_len = 1;
attr_merge( e, monitor_ad_desc, bv );
attr_mergeit( e, monitor_ad_desc, bv );
mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
e->e_private = ( void * )mp;
@ -336,7 +336,7 @@ conn_create(
bv[1].bv_val = NULL;
bv[0].bv_val = buf;
bv[0].bv_len = strlen( buf );
attr_merge( e, monitor_ad_desc, bv );
attr_mergeit( e, monitor_ad_desc, bv );
mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
e->e_private = ( void * )mp;

View file

@ -136,11 +136,11 @@ monitor_subsys_database_init(
}
if ( be->be_flags & SLAP_BFLAG_MONITOR ) {
attr_merge( e, ad_mc, be->be_suffix );
attr_merge( e_database, ad_mc, be->be_suffix );
attr_mergeit( e, ad_mc, be->be_suffix );
attr_mergeit( e_database, ad_mc, be->be_suffix );
} else {
attr_merge( e, ad_nc, be->be_suffix );
attr_merge( e_database, ad_nc, be->be_suffix );
attr_mergeit( e, ad_nc, be->be_suffix );
attr_mergeit( e_database, ad_nc, be->be_suffix );
}
for ( j = nBackendInfo; j--; ) {
@ -152,7 +152,7 @@ monitor_subsys_database_init(
j, monitor_subsys[SLAPD_MONITOR_BACKEND].mss_dn.bv_val );
bv.bv_val = buf;
bv.bv_len = strlen( buf );
attr_merge_one( e, ad_seeAlso, &bv );
attr_mergeit_one( e, ad_seeAlso, &bv );
break;
}
}
@ -239,7 +239,7 @@ monitor_back_add_plugin( Backend *be, Entry *e_database )
bv.bv_val = buf;
bv.bv_len = strlen( buf );
attr_merge_one( e_database, monitor_ad_desc, &bv );
attr_mergeit_one( e_database, monitor_ad_desc, &bv );
i++;

View file

@ -427,7 +427,7 @@ monitor_back_db_init(
} else {
bv[0].bv_len = strlen( Versionstr );
}
if ( attr_merge( e, monitor_ad_desc, bv ) ) {
if ( attr_mergeit( e, monitor_ad_desc, bv ) ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, CRIT,
"unable to add description to '%s' entry\n",

View file

@ -126,7 +126,7 @@ monitor_subsys_listener_init(
bv[1].bv_val = NULL;
bv[0].bv_val = "TLS";
bv[0].bv_len = sizeof("TLS")-1;
attr_merge( e, monitor_ad_desc, bv );
attr_mergeit( e, monitor_ad_desc, bv );
}
#endif /* HAVE_TLS */
#ifdef LDAP_CONNECTIONLESS
@ -135,7 +135,7 @@ monitor_subsys_listener_init(
bv[1].bv_val = NULL;
bv[0].bv_val = "UDP";
bv[0].bv_len = sizeof("UDP")-1;
attr_merge( e, monitor_ad_desc, bv );
attr_mergeit( e, monitor_ad_desc, bv );
}
#endif /* HAVE_TLS */

View file

@ -117,7 +117,7 @@ monitor_subsys_log_init(
bv[0].bv_val = ( char * )int_2_level[ i ].s;
bv[0].bv_len = strlen( bv[0].bv_val );
attr_merge( e, monitor_ad_desc, bv );
attr_mergeit( e, monitor_ad_desc, bv );
}
}
@ -151,7 +151,7 @@ monitor_subsys_log_modify(
*/
if ( is_at_operational( mod->sm_desc->ad_type ) ) {
( void ) attr_delete( &e->e_attrs, mod->sm_desc );
rc = attr_merge( e, mod->sm_desc, mod->sm_bvalues );
rc = attr_mergeit( e, mod->sm_desc, mod->sm_bvalues );
if ( rc != 0 ) {
rc = LDAP_OTHER;
break;
@ -347,8 +347,8 @@ add_values( Entry *e, Modification *mod, int *newlevel )
}
/* no - add them */
if ( attr_merge( e, mod->sm_desc, mod->sm_bvalues ) != 0 ) {
/* this should return result of attr_merge */
if ( attr_mergeit( e, mod->sm_desc, mod->sm_bvalues ) != 0 ) {
/* this should return result of attr_mergeit */
return LDAP_OTHER;
}
@ -471,7 +471,7 @@ replace_values( Entry *e, Modification *mod, int *newlevel )
}
if ( mod->sm_bvalues != NULL &&
attr_merge( e, mod->sm_desc, mod->sm_bvalues ) != 0 ) {
attr_mergeit( e, mod->sm_desc, mod->sm_bvalues ) != 0 ) {
return LDAP_OTHER;
}

View file

@ -124,7 +124,7 @@ monitor_subsys_ops_init(
bv[1].bv_val = NULL;
bv[0].bv_val = "0";
bv[0].bv_len = 1;
attr_merge( e, monitor_ad_desc, bv );
attr_mergeit( e, monitor_ad_desc, bv );
mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
e->e_private = ( void * )mp;
@ -192,7 +192,7 @@ monitor_subsys_ops_init(
bv[1].bv_val = NULL;
bv[0].bv_val = "0";
bv[0].bv_len = 1;
attr_merge( e, monitor_ad_desc, bv );
attr_mergeit( e, monitor_ad_desc, bv );
mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
e->e_private = ( void * )mp;
@ -259,7 +259,7 @@ monitor_subsys_ops_init(
bv[0].bv_val = "0";
bv[0].bv_len = 1;
attr_merge( e, monitor_ad_desc, bv );
attr_mergeit( e, monitor_ad_desc, bv );
mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
e->e_private = ( void * )mp;
@ -326,7 +326,7 @@ monitor_subsys_ops_init(
bv[0].bv_val = "0";
bv[0].bv_len = 1;
attr_merge( e, monitor_ad_desc, bv );
attr_mergeit( e, monitor_ad_desc, bv );
mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
e->e_private = ( void * )mp;

View file

@ -119,7 +119,7 @@ monitor_subsys_readw_update_internal(
if ( b == NULL || b[0].bv_val == NULL ) {
bv[0].bv_val = buf;
bv[0].bv_len = strlen( buf );
attr_merge( e, monitor_ad_desc, bv );
attr_mergeit( e, monitor_ad_desc, bv );
}
return( 0 );

View file

@ -102,7 +102,7 @@ monitor_subsys_sent_init(
bv[1].bv_val = NULL;
bv[0].bv_val = "0";
bv[0].bv_len = 1;
attr_merge( e, monitor_ad_desc, bv );
attr_mergeit( e, monitor_ad_desc, bv );
mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
e->e_private = ( void * )mp;
@ -158,7 +158,7 @@ monitor_subsys_sent_init(
bv[0].bv_val = "0";
bv[0].bv_len = 1;
attr_merge( e, monitor_ad_desc, bv );
attr_mergeit( e, monitor_ad_desc, bv );
mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
e->e_private = ( void * )mp;
@ -214,7 +214,7 @@ monitor_subsys_sent_init(
bv[0].bv_val = "0";
bv[0].bv_len = 1;
attr_merge( e, monitor_ad_desc, bv );
attr_mergeit( e, monitor_ad_desc, bv );
mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
e->e_private = ( void * )mp;
@ -270,7 +270,7 @@ monitor_subsys_sent_init(
bv[0].bv_val = "0";
bv[0].bv_len = 1;
attr_merge( e, monitor_ad_desc, bv );
attr_mergeit( e, monitor_ad_desc, bv );
mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
e->e_private = ( void * )mp;

View file

@ -76,7 +76,7 @@ monitor_subsys_thread_init(
bv[0].bv_val = buf;
bv[0].bv_len = strlen( bv[0].bv_val );
attr_merge( e, monitor_ad_desc, bv );
attr_mergeit( e, monitor_ad_desc, bv );
monitor_cache_release( mi, e );
@ -113,7 +113,7 @@ monitor_subsys_thread_update(
if ( b == NULL || b[0].bv_val == NULL ) {
bv[0].bv_val = buf;
bv[0].bv_len = strlen( buf );
attr_merge( e, monitor_ad_desc, bv );
attr_mergeit( e, monitor_ad_desc, bv );
}
return( 0 );

View file

@ -133,6 +133,9 @@ LDAP_SLAPD_F (void) attr_free LDAP_P(( Attribute *a ));
LDAP_SLAPD_F (Attribute *) attr_dup LDAP_P(( Attribute *a ));
#ifdef SLAP_NVALUES
#define attr_mergeit( e, d, v ) attr_merge( e, d, v, NULL /* FIXME */ )
#define attr_mergeit_one( e, d, v ) attr_merge_one( e, d, v, NULL /* FIXME */ )
LDAP_SLAPD_F (int) attr_merge LDAP_P(( Entry *e,
AttributeDescription *desc,
BerVarray vals,
@ -142,6 +145,8 @@ LDAP_SLAPD_F (int) attr_merge_one LDAP_P(( Entry *e,
struct berval *val,
struct berval *nval ));
#else
#define attr_mergeit( e, d, v ) attr_merge( e, d, v )
#define attr_mergeit_one( e, d, v ) attr_merge( e, d, v )
LDAP_SLAPD_F (int) attr_merge LDAP_P(( Entry *e,
AttributeDescription *desc,
BerVarray vals ));