mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-30 13:30:57 +08:00
ITS#3376 Fix prev commit, handling of replogfile
This commit is contained in:
parent
db8debbfc8
commit
1d35c8f8ec
@ -48,7 +48,6 @@
|
||||
*/
|
||||
slap_mask_t global_allows = 0;
|
||||
slap_mask_t global_disallows = 0;
|
||||
char *replogfile;
|
||||
int global_gentlehup = 0;
|
||||
int global_idletimeout = 0;
|
||||
char *global_host = NULL;
|
||||
@ -218,7 +217,7 @@ ConfigTable SystemConfiguration[] = {
|
||||
{ "replicationInterval", 0, 0, 0, NULL, ARG_IGNORED, NULL, NULL, NULL, NULL },
|
||||
{ "updatedn", 2, 2, 0, "dn", ARG_DB|ARG_MAGIC, &config_updatedn, NULL, NULL, NULL },
|
||||
{ "updateref", 2, 2, 0, "url", ARG_DB|ARG_MAGIC, &config_updateref, NULL, NULL, NULL },
|
||||
{ "replogfile", 2, 2, 0, "filename", ARG_MAGIC|CFG_REPLOG, &config_generic, NULL, NULL, NULL },
|
||||
{ "replogfile", 2, 2, 0, "filename", ARG_MAGIC|ARG_STRING|CFG_REPLOG, &config_generic, NULL, NULL, NULL },
|
||||
{ "rootDSE", 2, 2, 0, "filename", ARG_MAGIC|CFG_ROOTDSE, &config_generic, NULL, NULL, NULL },
|
||||
{ "lastmod", 2, 2, 0, "on|off", ARG_DB|ARG_ON_OFF|ARG_MAGIC|CFG_LASTMOD, &config_generic, NULL, NULL, NULL },
|
||||
#ifdef SIGHUP
|
||||
|
@ -1343,7 +1343,6 @@ LDAP_SLAPD_V (slap_mask_t) global_allows;
|
||||
LDAP_SLAPD_V (slap_mask_t) global_disallows;
|
||||
|
||||
LDAP_SLAPD_V (BerVarray) default_referral;
|
||||
LDAP_SLAPD_V (char *) replogfile;
|
||||
LDAP_SLAPD_V (const char) Versionstr[];
|
||||
|
||||
LDAP_SLAPD_V (int) global_gentlehup;
|
||||
|
@ -134,14 +134,16 @@ replog( Operation *op )
|
||||
#endif
|
||||
int subsets = 0;
|
||||
long now = slap_get_time();
|
||||
char *replogfile;
|
||||
|
||||
if ( op->o_bd->be_replogfile == NULL && replogfile == NULL ) {
|
||||
replogfile = op->o_bd->be_replogfile ? op->o_bd->be_replogfile :
|
||||
frontendDB->be_replogfile;
|
||||
if ( !replogfile ) {
|
||||
return;
|
||||
}
|
||||
|
||||
ldap_pvt_thread_mutex_lock( &replog_mutex );
|
||||
if ( (fp = lock_fopen( op->o_bd->be_replogfile ? op->o_bd->be_replogfile :
|
||||
replogfile, "a", &lfp )) == NULL ) {
|
||||
if ( (fp = lock_fopen( replogfile, "a", &lfp )) == NULL ) {
|
||||
ldap_pvt_thread_mutex_unlock( &replog_mutex );
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user