]> git.sur5r.net Git - openldap/commitdiff
move entrypriv_create into monitor_extra_t
authorPierangelo Masarati <ando@OpenLDAP.org>
Mon, 9 Apr 2012 16:36:14 +0000 (18:36 +0200)
committerPierangelo Masarati <ando@OpenLDAP.org>
Mon, 9 Apr 2012 16:37:48 +0000 (18:37 +0200)
servers/slapd/back-ldap/monitor.c
servers/slapd/back-monitor/back-monitor.h
servers/slapd/back-monitor/entry.c
servers/slapd/back-monitor/init.c
servers/slapd/back-monitor/proto-back-monitor.h

index 678feae5ca55bccecf88a2f0695e42009915af66..456c14a418b2599a728ddeec2f8e4fb6f30ca1ca 100644 (file)
@@ -377,6 +377,7 @@ ldap_back_monitor_subsystem_destroy(
  */
 
 struct ldap_back_monitor_conn_arg {
+       Operation *op;
        monitor_subsys_t *ms;
        Entry **ep;
 };
@@ -467,6 +468,7 @@ ldap_back_monitor_conn_entry(
 {
        Entry *e;
        monitor_entry_t         *mp;
+       monitor_extra_t *mbe;
        char buf[SLAP_TEXT_BUFLEN];
        char *ptr;
        struct berval bv, dn, ndn;
@@ -511,7 +513,8 @@ ldap_back_monitor_conn_entry(
        attr_merge_normalize_one( e, ad_olmDbPeerAddress, &bv, NULL );
        ch_free( bv.bv_val );
 
-       mp = monitor_entrypriv_create();
+       mbe = (monitor_extra_t *) arg->op->o_bd->bd_info->bi_extra;
+       mp = mbe->entrypriv_create();
        e->e_private = mp;
        mp->mp_info = arg->ms;
        mp->mp_flags = MONITOR_F_SUB | MONITOR_F_VOLATILE;
@@ -545,6 +548,7 @@ ldap_back_monitor_conn_create(
        li = (ldapinfo_t *)ms->mss_private;
 
        arg = ch_calloc( 1, sizeof(struct ldap_back_monitor_conn_arg) );
+       arg->op = op;
        arg->ep = ep;
        arg->ms = ms;
 
index cf33b7c0864ce794aa073f67c9e8dfe8d400a89a..7a5674c618748e7ea536e92fa30742c8c01ce33b 100644 (file)
@@ -313,6 +313,7 @@ typedef struct monitor_extra_t {
                monitor_info_t  *mi,
                struct berval *create,
                struct berval *modify );
+       monitor_entry_t * (*entrypriv_create)( void );
 } monitor_extra_t;
 
 LDAP_END_DECL
index f1fe27388375761e05a05bfe13990895d3421108..068bfc58386a9a415a7703531a7946a6b80b2248 100644 (file)
@@ -151,7 +151,7 @@ monitor_entry_test_flags(
 }
 
 monitor_entry_t *
-monitor_entrypriv_create( void )
+monitor_back_entrypriv_create( void )
 {
        monitor_entry_t *mp;
 
index 894ba4a71592aa9ea7085cfcc462dfa268e5d509..458f0bc439984470afe0d66666a9b9a6e2b2a463 100644 (file)
@@ -66,7 +66,8 @@ static const monitor_extra_t monitor_extra = {
        monitor_back_unregister_entry_attrs,
        monitor_back_unregister_entry_callback,
 
-       monitor_back_entry_stub
+       monitor_back_entry_stub,
+       monitor_back_entrypriv_create
 };
        
 
index cf0eba21b7cb35eb1baf67f18098a6b2193e0990..143d917eb99cc83f8bf5e96a79cc2d084256040e 100644 (file)
@@ -124,9 +124,8 @@ monitor_entry_test_flags LDAP_P((
        monitor_entry_t         *mp,
        int                     cond ));
 extern monitor_entry_t *
-monitor_entrypriv_create LDAP_P((
+monitor_back_entrypriv_create LDAP_P((
        void ));
-
 extern Entry *
 monitor_back_entry_stub LDAP_P((
        struct berval   *pdn,
@@ -137,6 +136,7 @@ monitor_back_entry_stub LDAP_P((
        struct berval   *create,
        struct berval   *modify ));
 
+#define monitor_entrypriv_create monitor_back_entrypriv_create
 #define monitor_entry_stub monitor_back_entry_stub
 
 /*