From: Jong Hyuk Choi Date: Mon, 23 Jun 2003 14:14:47 +0000 (+0000) Subject: - syncrepl configuration uses URL only X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~870 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=30ccb6087f7ccceebffc674095e5fc4a34268994;p=openldap - syncrepl configuration uses URL only - slimit, tlimit fix (ITS# 2592) --- diff --git a/servers/slapd/config.c b/servers/slapd/config.c index c7d0df77d9..783550f8d3 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -2746,7 +2746,7 @@ add_syncrepl( si = be->syncinfo = (syncinfo_t *) ch_calloc( 1, sizeof( syncinfo_t ) ); /* set default values; FIXME : add others */ - si->tlimit = NULL; + si->tlimit = -1; si->slimit = -1; if ( si == NULL ) { @@ -2770,14 +2770,12 @@ add_syncrepl( } else { #ifdef NEW_LOGGING LDAP_LOG ( CONFIG, RESULTS, - "add_syncrepl: Config: ** successfully added syncrepl \"%s%d\"\n", - si->mastername == NULL ? "(null)" : si->mastername, - si->masterport, 0 ); + "add_syncrepl: Config: ** successfully added syncrepl \"%s\"\n", + si->masteruri == NULL ? "(null)" : si->masteruri, 0, 0 ); #else Debug( LDAP_DEBUG_CONFIG, - "Config: ** successfully added syncrepl \"%s:%d\"\n", - si->mastername == NULL ? "(null)" : si->mastername, - si->masterport, 0 ); + "Config: ** successfully added syncrepl \"%s\"\n", + si->masteruri == NULL ? "(null)" : si->masteruri, 0, 0 ); #endif si->be = be; } @@ -2853,31 +2851,6 @@ parse_syncrepl_line( sizeof( PROVIDERSTR ) - 1 )) { val = cargv[ i ] + sizeof( PROVIDERSTR ); 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; } else if ( !strncasecmp( cargv[ i ], STARTTLSSTR, sizeof(STARTTLSSTR) - 1 ) )