move entrypriv_create into monitor_extra_t

This commit is contained in:
Pierangelo Masarati 2012-04-09 18:36:14 +02:00
parent 11acc75e9f
commit 829efa878a
5 changed files with 11 additions and 5 deletions

View 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;

View 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

View 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;

View 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
};

View 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
/*