mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-28 02:29:34 -05:00
Added ndn to replog args, eliminate unnecessary dn_normalize in replog.
This commit is contained in:
parent
1f28047ab5
commit
acc2500114
7 changed files with 8 additions and 18 deletions
|
|
@ -286,7 +286,7 @@ do_add( Connection *conn, Operation *op )
|
|||
if ( !repl_user )
|
||||
#endif
|
||||
{
|
||||
replog( be, op, e->e_dn, e );
|
||||
replog( be, op, e->e_dn, e->e_ndn, e );
|
||||
}
|
||||
be_entry_release_w( be, conn, op, e );
|
||||
e = NULL;
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ ldbm_back_exop_passwd(
|
|||
rc = LDAP_OTHER;
|
||||
}
|
||||
|
||||
replog( be, op, e->e_dn, &ml );
|
||||
replog( be, op, e->e_dn, e->e_ndn, &ml );
|
||||
}
|
||||
|
||||
done:
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ do_delete(
|
|||
if (be->be_update_ndn == NULL || !repl_user )
|
||||
#endif
|
||||
{
|
||||
replog( be, op, dn, NULL );
|
||||
replog( be, op, dn, ndn, NULL );
|
||||
}
|
||||
}
|
||||
#ifndef SLAPD_MULTIMASTER
|
||||
|
|
|
|||
|
|
@ -364,7 +364,7 @@ do_modify(
|
|||
#endif
|
||||
) {
|
||||
/* but we log only the ones not from a replicator user */
|
||||
replog( be, op, dn, mods );
|
||||
replog( be, op, dn, ndn, mods );
|
||||
}
|
||||
|
||||
#ifndef SLAPD_MULTIMASTER
|
||||
|
|
|
|||
|
|
@ -321,7 +321,7 @@ do_modrdn(
|
|||
moddn.deloldrdn = deloldrdn;
|
||||
moddn.newsup = newSuperior;
|
||||
|
||||
replog( be, op, dn, &moddn );
|
||||
replog( be, op, dn, ndn, &moddn );
|
||||
}
|
||||
#ifndef SLAPD_MULTIMASTER
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -516,7 +516,7 @@ LDAP_SLAPD_F (char *) phonetic LDAP_P(( char *s ));
|
|||
*/
|
||||
LDAP_SLAPD_F (int) add_replica_info LDAP_P(( Backend *be, const char *host ));
|
||||
LDAP_SLAPD_F (int) add_replica_suffix LDAP_P(( Backend *be, int nr, const char *suffix ));
|
||||
LDAP_SLAPD_F (void) replog LDAP_P(( Backend *be, Operation *op, char *dn, void *change ));
|
||||
LDAP_SLAPD_F (void) replog LDAP_P(( Backend *be, Operation *op, char *dn, char *ndn, void *change ));
|
||||
|
||||
/*
|
||||
* referral.c
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ replog(
|
|||
Backend *be,
|
||||
Operation *op,
|
||||
char *dn,
|
||||
char *ndn,
|
||||
void *change
|
||||
)
|
||||
{
|
||||
|
|
@ -100,16 +101,6 @@ replog(
|
|||
return;
|
||||
}
|
||||
|
||||
tmp = ch_strdup( dn );
|
||||
if ( dn_normalize( tmp ) == NULL ) {
|
||||
/* something has gone really bad */
|
||||
ch_free( tmp );
|
||||
|
||||
lock_fclose( fp, lfp );
|
||||
ldap_pvt_thread_mutex_unlock( &replog_mutex );
|
||||
return;
|
||||
}
|
||||
|
||||
for ( i = 0; be->be_replica != NULL && be->be_replica[i] != NULL;
|
||||
i++ ) {
|
||||
/* check if dn's suffix matches legal suffixes, if any */
|
||||
|
|
@ -117,7 +108,7 @@ replog(
|
|||
int j;
|
||||
|
||||
for ( j = 0; be->be_replica[i]->ri_nsuffix[j]; j++ ) {
|
||||
if ( dn_issuffix( tmp, be->be_replica[i]->ri_nsuffix[j] ) ) {
|
||||
if ( dn_issuffix( ndn, be->be_replica[i]->ri_nsuffix[j] ) ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -134,7 +125,6 @@ replog(
|
|||
#endif
|
||||
}
|
||||
|
||||
ch_free( tmp );
|
||||
#ifdef NO_LOG_WHEN_NO_REPLICAS
|
||||
if ( count == 0 ) {
|
||||
/* if no replicas matched, drop the log
|
||||
|
|
|
|||
Loading…
Reference in a new issue