]> git.sur5r.net Git - openldap/commitdiff
ITS#7182 Remove monitor_info_t from params for monitor_entry_stub.
authorOndrej Kuznik <ondrej.kuznik@acision.com>
Thu, 12 Apr 2012 07:44:21 +0000 (09:44 +0200)
committerHoward Chu <hyc@openldap.org>
Wed, 18 Apr 2012 18:44:36 +0000 (11:44 -0700)
15 files changed:
servers/slapd/back-ldap/monitor.c
servers/slapd/back-monitor/back-monitor.h
servers/slapd/back-monitor/backend.c
servers/slapd/back-monitor/conn.c
servers/slapd/back-monitor/database.c
servers/slapd/back-monitor/entry.c
servers/slapd/back-monitor/init.c
servers/slapd/back-monitor/listener.c
servers/slapd/back-monitor/operation.c
servers/slapd/back-monitor/overlay.c
servers/slapd/back-monitor/proto-back-monitor.h
servers/slapd/back-monitor/rww.c
servers/slapd/back-monitor/sent.c
servers/slapd/back-monitor/thread.c
servers/slapd/back-monitor/time.c

index 35e19c4d5816e2c1f4c49864ca8e384ede1dd295..f1816780a29f8bed48bd11e65983452adbe7665f 100644 (file)
@@ -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: "
index 50073d719c3f5378eec858a0a05df8f8261185d7..6d73e31257900f95ca8d9c8b07139d7ea2840c31 100644 (file)
@@ -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 );
index 5f492c1d7b812d1ae34aa1c125d0429232af66dc..b0416f6c6fc53db85cff0b1b26a023a2b80a55fa 100644 (file)
@@ -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,
index 5426bd0f5042232086fbc2471397de89ffd4dce7..53d17ed083c0848ff14c08b43bb7624ee2b450e7 100644 (file)
@@ -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,
index 4aba31f46847907e768b08c7114661dfe40f6b07..a9ea11d22514a466d3afe1ed2dca2d94d84d28b2 100644 (file)
@@ -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,
index 068bfc58386a9a415a7703531a7946a6b80b2248..aaf9ed6a17dabf78895b9fb39cb9f72615d66ebf 100644 (file)
@@ -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;
index 59eedcbbd3431932c1388c535d2c030fc6bc977b..c7350d78e45ffba4906e24ec3febdb2b384a7c8f 100644 (file)
@@ -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) {
index 903015a6af056b352a48533a3305636e295b4b05..94737fd0149d677bfc89697df4177c8db39858ae 100644 (file)
@@ -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,
index a36b470bd9fd5857896953d77ee2a019429ccb47..ac903bd0f98a58598dd1047c0c8f69554faf091f 100644 (file)
@@ -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,
index 3a563df6cd35e5e2d4adc69f58d2feb31f82edde..5faeedc50ede8296065e5b53d0f5d9a9fcc350a4 100644 (file)
@@ -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: "
index 86895cc3b54a17b42aa950f2e8534a5c04e0482e..da20592d9a24f062fcce49ca6d33502ede4c5426 100644 (file)
@@ -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 ));
 
index 867a06df958c8aa33992d3524e585f1a283409cf..e25249aabd68afac6bdc7a76d2552948dd844aae 100644 (file)
@@ -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: "
index e67be4a36ab611c479506e331f9e6c288cc7e560..8bd38fe24690447c85865313115fde31e1bff808 100644 (file)
@@ -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,
index 67077aa6c839f4b845bcb9c942140199930533e5..e432d20c04e1b1d890ba1d1e44515d56b37878cc 100644 (file)
@@ -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: "
index d41daa925566a88d1f36a0be61217e6f801b6708..bbc6817861c4e2ea3978fa7069dd626ae9786da5 100644 (file)
@@ -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: "