From: Ondrej Kuznik Date: Thu, 12 Apr 2012 07:44:21 +0000 (+0200) Subject: ITS#7182 Remove monitor_info_t from params for monitor_entry_stub. X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e8d913110d4cbf3403684fe83c9307c0bbb8c4e8;p=openldap ITS#7182 Remove monitor_info_t from params for monitor_entry_stub. --- diff --git a/servers/slapd/back-ldap/monitor.c b/servers/slapd/back-ldap/monitor.c index 35e19c4d58..f1816780a2 100644 --- a/servers/slapd/back-ldap/monitor.c +++ b/servers/slapd/back-ldap/monitor.c @@ -595,7 +595,7 @@ ldap_back_monitor_conn_init( e = mbe->entry_stub( &ms->mss_dn, &ms->mss_ndn, &ms->mss_rdn, - mi->mi_oc_monitorContainer, mi, NULL, NULL ); + mi->mi_oc_monitorContainer, NULL, NULL ); if ( e == NULL ) { Debug( LDAP_DEBUG_ANY, "ldap_back_monitor_conn_init: " @@ -755,7 +755,7 @@ ldap_back_monitor_ops_init( parent = mbe->entry_stub( &ms->mss_dn, &ms->mss_ndn, &ms->mss_rdn, - mi->mi_oc_monitorContainer, mi, NULL, NULL ); + mi->mi_oc_monitorContainer, NULL, NULL ); if ( parent == NULL ) { Debug( LDAP_DEBUG_ANY, "ldap_back_monitor_ops_init: " @@ -785,7 +785,7 @@ ldap_back_monitor_ops_init( e = mbe->entry_stub( &parent->e_name, &parent->e_nname, &ldap_back_monitor_op[op].rdn, - mi->mi_oc_monitorCounterObject, mi, NULL, NULL ); + mi->mi_oc_monitorCounterObject, NULL, NULL ); if ( e == NULL ) { Debug( LDAP_DEBUG_ANY, "ldap_back_monitor_ops_init: " diff --git a/servers/slapd/back-monitor/back-monitor.h b/servers/slapd/back-monitor/back-monitor.h index 50073d719c..6d73e31257 100644 --- a/servers/slapd/back-monitor/back-monitor.h +++ b/servers/slapd/back-monitor/back-monitor.h @@ -311,7 +311,6 @@ typedef struct monitor_extra_t { struct berval *pndn, struct berval *rdn, ObjectClass *oc, - monitor_info_t *mi, struct berval *create, struct berval *modify ); monitor_entry_t * (*entrypriv_create)( void ); diff --git a/servers/slapd/back-monitor/backend.c b/servers/slapd/back-monitor/backend.c index 5f492c1d7b..b0416f6c6f 100644 --- a/servers/slapd/back-monitor/backend.c +++ b/servers/slapd/back-monitor/backend.c @@ -83,7 +83,7 @@ monitor_subsys_backend_init( bv.bv_val = buf; e = monitor_entry_stub( &ms->mss_dn, &ms->mss_ndn, &bv, - mi->mi_oc_monitoredObject, mi, NULL, NULL ); + mi->mi_oc_monitoredObject, NULL, NULL ); if ( e == NULL ) { Debug( LDAP_DEBUG_ANY, diff --git a/servers/slapd/back-monitor/conn.c b/servers/slapd/back-monitor/conn.c index 5426bd0f50..53d17ed083 100644 --- a/servers/slapd/back-monitor/conn.c +++ b/servers/slapd/back-monitor/conn.c @@ -77,7 +77,7 @@ monitor_subsys_conn_init( */ BER_BVSTR( &bv, "cn=Max File Descriptors" ); e = monitor_entry_stub( &ms->mss_dn, &ms->mss_ndn, &bv, - mi->mi_oc_monitorCounterObject, mi, NULL, NULL ); + mi->mi_oc_monitorCounterObject, NULL, NULL ); if ( e == NULL ) { Debug( LDAP_DEBUG_ANY, @@ -122,7 +122,7 @@ monitor_subsys_conn_init( */ BER_BVSTR( &bv, "cn=Total" ); e = monitor_entry_stub( &ms->mss_dn, &ms->mss_ndn, &bv, - mi->mi_oc_monitorCounterObject, mi, NULL, NULL ); + mi->mi_oc_monitorCounterObject, NULL, NULL ); if ( e == NULL ) { Debug( LDAP_DEBUG_ANY, @@ -161,7 +161,7 @@ monitor_subsys_conn_init( */ BER_BVSTR( &bv, "cn=Current" ); e = monitor_entry_stub( &ms->mss_dn, &ms->mss_ndn, &bv, - mi->mi_oc_monitorCounterObject, mi, NULL, NULL ); + mi->mi_oc_monitorCounterObject, NULL, NULL ); if ( e == NULL ) { Debug( LDAP_DEBUG_ANY, @@ -292,7 +292,7 @@ conn_create( "cn=Connection %ld", c->c_connid ); bv.bv_val = buf; e = monitor_entry_stub( &ms->mss_dn, &ms->mss_ndn, &bv, - mi->mi_oc_monitorConnection, mi, &ctmbv, &mtmbv ); + mi->mi_oc_monitorConnection, &ctmbv, &mtmbv ); if ( e == NULL) { Debug( LDAP_DEBUG_ANY, diff --git a/servers/slapd/back-monitor/database.c b/servers/slapd/back-monitor/database.c index 4aba31f468..a9ea11d225 100644 --- a/servers/slapd/back-monitor/database.c +++ b/servers/slapd/back-monitor/database.c @@ -143,7 +143,7 @@ monitor_subsys_overlay_init_one( bv.bv_val = buf; e_overlay = monitor_entry_stub( &e_database->e_name, &e_database->e_nname, &bv, - mi->mi_oc_monitoredObject, mi, NULL, NULL ); + mi->mi_oc_monitoredObject, NULL, NULL ); if ( e_overlay == NULL ) { Debug( LDAP_DEBUG_ANY, @@ -222,7 +222,7 @@ monitor_subsys_database_init_one( } e = monitor_entry_stub( &ms->mss_dn, &ms->mss_ndn, rdn, - mi->mi_oc_monitoredObject, mi, NULL, NULL ); + mi->mi_oc_monitoredObject, NULL, NULL ); if ( e == NULL ) { Debug( LDAP_DEBUG_ANY, diff --git a/servers/slapd/back-monitor/entry.c b/servers/slapd/back-monitor/entry.c index 068bfc5838..aaf9ed6a17 100644 --- a/servers/slapd/back-monitor/entry.c +++ b/servers/slapd/back-monitor/entry.c @@ -174,11 +174,11 @@ monitor_entry_stub( struct berval *pndn, struct berval *rdn, ObjectClass *oc, - monitor_info_t *mi, struct berval *create, struct berval *modify ) { + monitor_info_t *mi; AttributeDescription *nad = NULL; Entry *e; struct berval nat; @@ -186,6 +186,8 @@ monitor_entry_stub( const char *text; int rc; + mi = ( monitor_info_t * )be_monitor->be_private; + nat = *rdn; ptr = strchr( nat.bv_val, '=' ); nat.bv_len = ptr - nat.bv_val; diff --git a/servers/slapd/back-monitor/init.c b/servers/slapd/back-monitor/init.c index 59eedcbbd3..c7350d78e4 100644 --- a/servers/slapd/back-monitor/init.c +++ b/servers/slapd/back-monitor/init.c @@ -2286,7 +2286,7 @@ monitor_back_db_open( /* * creates the "cn=Monitor" entry */ - e = monitor_entry_stub( NULL, NULL, &rdn, mi->mi_oc_monitorServer, mi, + e = monitor_entry_stub( NULL, NULL, &rdn, mi->mi_oc_monitorServer, NULL, NULL ); if ( e == NULL) { @@ -2367,7 +2367,7 @@ monitor_back_db_open( } e = monitor_entry_stub( &root->e_name, &root->e_nname, - &monitor_subsys[ i ]->mss_rdn, mi->mi_oc_monitorContainer, mi, + &monitor_subsys[ i ]->mss_rdn, mi->mi_oc_monitorContainer, NULL, NULL ); if ( e == NULL) { diff --git a/servers/slapd/back-monitor/listener.c b/servers/slapd/back-monitor/listener.c index 903015a6af..94737fd014 100644 --- a/servers/slapd/back-monitor/listener.c +++ b/servers/slapd/back-monitor/listener.c @@ -75,7 +75,7 @@ monitor_subsys_listener_init( "cn=Listener %d", i ); bv.bv_val = buf; e = monitor_entry_stub( &ms->mss_dn, &ms->mss_ndn, &bv, - mi->mi_oc_monitoredObject, mi, NULL, NULL ); + mi->mi_oc_monitoredObject, NULL, NULL ); if ( e == NULL ) { Debug( LDAP_DEBUG_ANY, diff --git a/servers/slapd/back-monitor/operation.c b/servers/slapd/back-monitor/operation.c index a36b470bd9..ac903bd0f9 100644 --- a/servers/slapd/back-monitor/operation.c +++ b/servers/slapd/back-monitor/operation.c @@ -102,7 +102,7 @@ monitor_subsys_ops_init( * Initiated ops */ e = monitor_entry_stub( &ms->mss_dn, &ms->mss_ndn, &monitor_op[i].rdn, - mi->mi_oc_monitorOperation, mi, NULL, NULL ); + mi->mi_oc_monitorOperation, NULL, NULL ); if ( e == NULL ) { Debug( LDAP_DEBUG_ANY, diff --git a/servers/slapd/back-monitor/overlay.c b/servers/slapd/back-monitor/overlay.c index 3a563df6cd..5faeedc50e 100644 --- a/servers/slapd/back-monitor/overlay.c +++ b/servers/slapd/back-monitor/overlay.c @@ -78,7 +78,7 @@ monitor_subsys_overlay_init( bv.bv_len = snprintf( buf, sizeof( buf ), "cn=Overlay %d", i ); bv.bv_val = buf; e = monitor_entry_stub( &ms->mss_dn, &ms->mss_ndn, &bv, - mi->mi_oc_monitoredObject, mi, NULL, NULL ); + mi->mi_oc_monitoredObject, NULL, NULL ); if ( e == NULL ) { Debug( LDAP_DEBUG_ANY, "monitor_subsys_overlay_init: " diff --git a/servers/slapd/back-monitor/proto-back-monitor.h b/servers/slapd/back-monitor/proto-back-monitor.h index 86895cc3b5..da20592d9a 100644 --- a/servers/slapd/back-monitor/proto-back-monitor.h +++ b/servers/slapd/back-monitor/proto-back-monitor.h @@ -132,7 +132,6 @@ monitor_back_entry_stub LDAP_P(( struct berval *pndn, struct berval *rdn, ObjectClass *oc, - monitor_info_t *mi, struct berval *create, struct berval *modify )); diff --git a/servers/slapd/back-monitor/rww.c b/servers/slapd/back-monitor/rww.c index 867a06df95..e25249aabd 100644 --- a/servers/slapd/back-monitor/rww.c +++ b/servers/slapd/back-monitor/rww.c @@ -90,7 +90,7 @@ monitor_subsys_rww_init( Entry *e; e = monitor_entry_stub( &ms->mss_dn, &ms->mss_ndn, &monitor_rww[i].rdn, - mi->mi_oc_monitorCounterObject, mi, NULL, NULL ); + mi->mi_oc_monitorCounterObject, NULL, NULL ); if ( e == NULL ) { Debug( LDAP_DEBUG_ANY, "monitor_subsys_rww_init: " diff --git a/servers/slapd/back-monitor/sent.c b/servers/slapd/back-monitor/sent.c index e67be4a36a..8bd38fe246 100644 --- a/servers/slapd/back-monitor/sent.c +++ b/servers/slapd/back-monitor/sent.c @@ -94,7 +94,7 @@ monitor_subsys_sent_init( e = monitor_entry_stub( &ms->mss_dn, &ms->mss_ndn, &monitor_sent[i].rdn, mi->mi_oc_monitorCounterObject, - mi, NULL, NULL ); + NULL, NULL ); if ( e == NULL ) { Debug( LDAP_DEBUG_ANY, diff --git a/servers/slapd/back-monitor/thread.c b/servers/slapd/back-monitor/thread.c index 67077aa6c8..e432d20c04 100644 --- a/servers/slapd/back-monitor/thread.c +++ b/servers/slapd/back-monitor/thread.c @@ -139,7 +139,7 @@ monitor_subsys_thread_init( */ e = monitor_entry_stub( &ms->mss_dn, &ms->mss_ndn, &mt[ i ].rdn, - mi->mi_oc_monitoredObject, mi, NULL, NULL ); + mi->mi_oc_monitoredObject, NULL, NULL ); if ( e == NULL ) { Debug( LDAP_DEBUG_ANY, "monitor_subsys_thread_init: " diff --git a/servers/slapd/back-monitor/time.c b/servers/slapd/back-monitor/time.c index d41daa9255..bbc6817861 100644 --- a/servers/slapd/back-monitor/time.c +++ b/servers/slapd/back-monitor/time.c @@ -69,7 +69,7 @@ monitor_subsys_time_init( BER_BVSTR( &bv, "cn=Start" ); e = monitor_entry_stub( &ms->mss_dn, &ms->mss_ndn, &bv, - mi->mi_oc_monitoredObject, mi, NULL, NULL ); + mi->mi_oc_monitoredObject, NULL, NULL ); if ( e == NULL ) { Debug( LDAP_DEBUG_ANY, "monitor_subsys_time_init: " @@ -105,7 +105,7 @@ monitor_subsys_time_init( */ BER_BVSTR( &bv, "cn=Current" ); e = monitor_entry_stub( &ms->mss_dn, &ms->mss_ndn, &bv, - mi->mi_oc_monitoredObject, mi, NULL, NULL ); + mi->mi_oc_monitoredObject, NULL, NULL ); if ( e == NULL ) { Debug( LDAP_DEBUG_ANY, "monitor_subsys_time_init: " @@ -141,7 +141,7 @@ monitor_subsys_time_init( */ BER_BVSTR( &bv, "cn=Uptime" ); e = monitor_entry_stub( &ms->mss_dn, &ms->mss_ndn, &bv, - mi->mi_oc_monitoredObject, mi, NULL, NULL ); + mi->mi_oc_monitoredObject, NULL, NULL ); if ( e == NULL ) { Debug( LDAP_DEBUG_ANY, "monitor_subsys_time_init: "