From: Pierangelo Masarati Date: Mon, 9 Apr 2012 16:15:31 +0000 (+0200) Subject: move entry_stub to monitor_extra_t X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=11acc75e9ff31ae52b3b8c94b63189b51a764c01;p=openldap move entry_stub to monitor_extra_t --- diff --git a/servers/slapd/back-ldap/monitor.c b/servers/slapd/back-ldap/monitor.c index 54a6a6d7f5..678feae5ca 100644 --- a/servers/slapd/back-ldap/monitor.c +++ b/servers/slapd/back-ldap/monitor.c @@ -589,7 +589,7 @@ ldap_back_monitor_conn_init( ms->mss_create = ldap_back_monitor_conn_create; ms->mss_destroy = ldap_back_monitor_subsystem_destroy; - e = monitor_entry_stub( &ms->mss_dn, &ms->mss_ndn, + e = mbe->entry_stub( &ms->mss_dn, &ms->mss_ndn, &ms->mss_rdn, mi->mi_oc_monitorContainer, mi, NULL, NULL ); if ( e == NULL ) { @@ -749,7 +749,7 @@ ldap_back_monitor_ops_init( ms->mss_rdn = li->li_monitor_info.lmi_ops_rdn; ms->mss_destroy = ldap_back_monitor_subsystem_destroy; - parent = monitor_entry_stub( &ms->mss_dn, &ms->mss_ndn, + parent = mbe->entry_stub( &ms->mss_dn, &ms->mss_ndn, &ms->mss_rdn, mi->mi_oc_monitorContainer, mi, NULL, NULL ); if ( parent == NULL ) { @@ -779,7 +779,7 @@ ldap_back_monitor_ops_init( monitor_callback_t *cb; struct ldap_back_monitor_op_counter *counter; - e = monitor_entry_stub( &parent->e_name, &parent->e_nname, + e = mbe->entry_stub( &parent->e_name, &parent->e_nname, &ldap_back_monitor_op[op].rdn, mi->mi_oc_monitorCounterObject, mi, NULL, NULL ); if ( e == NULL ) { diff --git a/servers/slapd/back-monitor/back-monitor.h b/servers/slapd/back-monitor/back-monitor.h index 49618958cb..cf33b7c086 100644 --- a/servers/slapd/back-monitor/back-monitor.h +++ b/servers/slapd/back-monitor/back-monitor.h @@ -306,6 +306,13 @@ typedef struct monitor_extra_t { monitor_cbfunc *unregister_entry_parent; monitor_cbafunc *unregister_entry_attrs; monitor_cbfunc *unregister_entry_callback; + Entry * (*entry_stub)( struct berval *pdn, + struct berval *pndn, + struct berval *rdn, + ObjectClass *oc, + monitor_info_t *mi, + struct berval *create, + struct berval *modify ); } monitor_extra_t; LDAP_END_DECL diff --git a/servers/slapd/back-monitor/init.c b/servers/slapd/back-monitor/init.c index 92e1c0e54c..894ba4a715 100644 --- a/servers/slapd/back-monitor/init.c +++ b/servers/slapd/back-monitor/init.c @@ -64,7 +64,9 @@ static const monitor_extra_t monitor_extra = { monitor_back_unregister_entry, monitor_back_unregister_entry_parent, monitor_back_unregister_entry_attrs, - monitor_back_unregister_entry_callback + monitor_back_unregister_entry_callback, + + monitor_back_entry_stub }; diff --git a/servers/slapd/back-monitor/proto-back-monitor.h b/servers/slapd/back-monitor/proto-back-monitor.h index 776d08136a..cf0eba21b7 100644 --- a/servers/slapd/back-monitor/proto-back-monitor.h +++ b/servers/slapd/back-monitor/proto-back-monitor.h @@ -128,14 +128,16 @@ monitor_entrypriv_create LDAP_P(( void )); extern Entry * -monitor_entry_stub LDAP_P(( +monitor_back_entry_stub LDAP_P(( struct berval *pdn, struct berval *pndn, struct berval *rdn, ObjectClass *oc, monitor_info_t *mi, struct berval *create, - struct berval *modify)); + struct berval *modify )); + +#define monitor_entry_stub monitor_back_entry_stub /* * init