mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
- syncrepl configuration uses URL only
- slimit, tlimit fix (ITS# 2592)
This commit is contained in:
parent
90364acc0b
commit
30ccb6087f
@ -2746,7 +2746,7 @@ add_syncrepl(
|
|||||||
si = be->syncinfo = (syncinfo_t *) ch_calloc( 1, sizeof( syncinfo_t ) );
|
si = be->syncinfo = (syncinfo_t *) ch_calloc( 1, sizeof( syncinfo_t ) );
|
||||||
|
|
||||||
/* set default values; FIXME : add others */
|
/* set default values; FIXME : add others */
|
||||||
si->tlimit = NULL;
|
si->tlimit = -1;
|
||||||
si->slimit = -1;
|
si->slimit = -1;
|
||||||
|
|
||||||
if ( si == NULL ) {
|
if ( si == NULL ) {
|
||||||
@ -2770,14 +2770,12 @@ add_syncrepl(
|
|||||||
} else {
|
} else {
|
||||||
#ifdef NEW_LOGGING
|
#ifdef NEW_LOGGING
|
||||||
LDAP_LOG ( CONFIG, RESULTS,
|
LDAP_LOG ( CONFIG, RESULTS,
|
||||||
"add_syncrepl: Config: ** successfully added syncrepl \"%s%d\"\n",
|
"add_syncrepl: Config: ** successfully added syncrepl \"%s\"\n",
|
||||||
si->mastername == NULL ? "(null)" : si->mastername,
|
si->masteruri == NULL ? "(null)" : si->masteruri, 0, 0 );
|
||||||
si->masterport, 0 );
|
|
||||||
#else
|
#else
|
||||||
Debug( LDAP_DEBUG_CONFIG,
|
Debug( LDAP_DEBUG_CONFIG,
|
||||||
"Config: ** successfully added syncrepl \"%s:%d\"\n",
|
"Config: ** successfully added syncrepl \"%s\"\n",
|
||||||
si->mastername == NULL ? "(null)" : si->mastername,
|
si->masteruri == NULL ? "(null)" : si->masteruri, 0, 0 );
|
||||||
si->masterport, 0 );
|
|
||||||
#endif
|
#endif
|
||||||
si->be = be;
|
si->be = be;
|
||||||
}
|
}
|
||||||
@ -2853,31 +2851,6 @@ parse_syncrepl_line(
|
|||||||
sizeof( PROVIDERSTR ) - 1 )) {
|
sizeof( PROVIDERSTR ) - 1 )) {
|
||||||
val = cargv[ i ] + sizeof( PROVIDERSTR );
|
val = cargv[ i ] + sizeof( PROVIDERSTR );
|
||||||
si->masteruri = ch_strdup( val );
|
si->masteruri = ch_strdup( val );
|
||||||
if (( hp = strchr( val, ':' )) != NULL ) {
|
|
||||||
if ( *( hp + 1 ) == '/' ) {
|
|
||||||
if ( *( hp + 2 ) == '/' ) {
|
|
||||||
val = hp + 3;
|
|
||||||
}
|
|
||||||
if (( hp = strchr( hp+1, ':' )) != NULL ) {
|
|
||||||
*hp = '\0';
|
|
||||||
hp++;
|
|
||||||
si->masterport = atoi( hp );
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
*hp = '\0';
|
|
||||||
hp++;
|
|
||||||
si->masterport = atoi( hp );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ( si->masterport <= 0 ) {
|
|
||||||
si->masterport = 0;
|
|
||||||
}
|
|
||||||
si->mastername = ch_strdup( val );
|
|
||||||
si->master_bv = (BerVarray) ch_calloc( 2, sizeof (struct berval ));
|
|
||||||
ber_str2bv( si->masteruri, strlen(si->masteruri), 0,
|
|
||||||
&si->master_bv[0] );
|
|
||||||
si->master_bv[1].bv_len = 0;
|
|
||||||
si->master_bv[1].bv_val = NULL;
|
|
||||||
gots |= GOT_HOST;
|
gots |= GOT_HOST;
|
||||||
} else if ( !strncasecmp( cargv[ i ], STARTTLSSTR,
|
} else if ( !strncasecmp( cargv[ i ], STARTTLSSTR,
|
||||||
sizeof(STARTTLSSTR) - 1 ) )
|
sizeof(STARTTLSSTR) - 1 ) )
|
||||||
|
Loading…
Reference in New Issue
Block a user