mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
ITS#3064 don't reset sync interval to zero on PERSIST
This commit is contained in:
parent
cc4d5c10df
commit
910101a267
@ -3310,15 +3310,12 @@ parse_syncrepl_line(
|
|||||||
} else if ( !strncasecmp( cargv[ i ],
|
} else if ( !strncasecmp( cargv[ i ],
|
||||||
INTERVALSTR, sizeof( INTERVALSTR ) - 1 ) )
|
INTERVALSTR, sizeof( INTERVALSTR ) - 1 ) )
|
||||||
{
|
{
|
||||||
val = cargv[ i ] + sizeof( INTERVALSTR );
|
|
||||||
if ( si->si_type == LDAP_SYNC_REFRESH_AND_PERSIST ) {
|
|
||||||
si->si_interval = 0;
|
|
||||||
} else {
|
|
||||||
char *hstr;
|
char *hstr;
|
||||||
char *mstr;
|
char *mstr;
|
||||||
char *dstr;
|
char *dstr;
|
||||||
char *sstr;
|
char *sstr;
|
||||||
int dd, hh, mm, ss;
|
int dd, hh, mm, ss;
|
||||||
|
val = cargv[ i ] + sizeof( INTERVALSTR );
|
||||||
dstr = val;
|
dstr = val;
|
||||||
hstr = strchr( dstr, ':' );
|
hstr = strchr( dstr, ':' );
|
||||||
if ( hstr == NULL ) {
|
if ( hstr == NULL ) {
|
||||||
@ -3354,7 +3351,7 @@ parse_syncrepl_line(
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
si->si_interval = (( dd * 24 + hh ) * 60 + mm ) * 60 + ss;
|
si->si_interval = (( dd * 24 + hh ) * 60 + mm ) * 60 + ss;
|
||||||
}
|
|
||||||
if ( si->si_interval < 0 ) {
|
if ( si->si_interval < 0 ) {
|
||||||
fprintf( stderr, "Error: parse_syncrepl_line: "
|
fprintf( stderr, "Error: parse_syncrepl_line: "
|
||||||
"invalid interval \"%ld\"\n",
|
"invalid interval \"%ld\"\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user