mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-18 11:05:48 +08:00
cleanup
This commit is contained in:
parent
3638004798
commit
0d475ca4f0
@ -1681,7 +1681,8 @@ add_syncrepl(
|
||||
} else {
|
||||
Debug( LDAP_DEBUG_CONFIG,
|
||||
"Config: ** successfully added syncrepl \"%s\"\n",
|
||||
si->si_provideruri == NULL ? "(null)" : si->si_provideruri, 0, 0 );
|
||||
BER_BVISNULL( &si->si_provideruri ) ?
|
||||
"(null)" : si->si_provideruri.bv_val, 0, 0 );
|
||||
if ( !si->si_schemachecking ) {
|
||||
SLAP_DBFLAGS(be) |= SLAP_DBFLAG_NO_SCHEMA_CHECK;
|
||||
}
|
||||
@ -1770,13 +1771,7 @@ parse_syncrepl_line(
|
||||
STRLENOF( PROVIDERSTR "=" ) ) )
|
||||
{
|
||||
val = cargv[ i ] + STRLENOF( PROVIDERSTR "=" );
|
||||
si->si_provideruri = ch_strdup( val );
|
||||
si->si_provideruri_bv = (BerVarray)
|
||||
ch_calloc( 2, sizeof( struct berval ));
|
||||
ber_str2bv( si->si_provideruri, strlen( si->si_provideruri ),
|
||||
1, &si->si_provideruri_bv[0] );
|
||||
si->si_provideruri_bv[1].bv_len = 0;
|
||||
si->si_provideruri_bv[1].bv_val = NULL;
|
||||
ber_str2bv( val, 0, 1, &si->si_provideruri );
|
||||
gots |= GOT_PROVIDER;
|
||||
} else if ( !strncasecmp( cargv[ i ], STARTTLSSTR "=",
|
||||
STRLENOF(STARTTLSSTR "=") ) )
|
||||
|
@ -1481,8 +1481,7 @@ LDAP_STAILQ_HEAD( slap_sync_cookie_s, sync_cookie );
|
||||
typedef struct syncinfo_s {
|
||||
struct slap_backend_db *si_be;
|
||||
long si_rid;
|
||||
char *si_provideruri;
|
||||
BerVarray si_provideruri_bv;
|
||||
struct berval si_provideruri;
|
||||
#define SYNCINFO_TLS_OFF 0
|
||||
#define SYNCINFO_TLS_ON 1
|
||||
#define SYNCINFO_TLS_CRITICAL 2
|
||||
|
@ -282,11 +282,11 @@ do_syncrep1(
|
||||
psub = &si->si_be->be_nsuffix[0];
|
||||
|
||||
/* Init connection to master */
|
||||
rc = ldap_initialize( &si->si_ld, si->si_provideruri );
|
||||
rc = ldap_initialize( &si->si_ld, si->si_provideruri.bv_val );
|
||||
if ( rc != LDAP_SUCCESS ) {
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"do_syncrep1: ldap_initialize failed (%s)\n",
|
||||
si->si_provideruri, 0, 0 );
|
||||
si->si_provideruri.bv_val, 0, 0 );
|
||||
return rc;
|
||||
}
|
||||
|
||||
@ -317,7 +317,7 @@ do_syncrep1(
|
||||
if( rc != LDAP_OPT_SUCCESS ) {
|
||||
Debug( LDAP_DEBUG_ANY, "Error: ldap_set_option "
|
||||
"(%s,SECPROPS,\"%s\") failed!\n",
|
||||
si->si_provideruri, si->si_secprops, 0 );
|
||||
si->si_provideruri.bv_val, si->si_secprops, 0 );
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
@ -2074,11 +2074,8 @@ avl_ber_bvfree( void *v_bv )
|
||||
void
|
||||
syncinfo_free( syncinfo_t *sie )
|
||||
{
|
||||
if ( sie->si_provideruri ) {
|
||||
ch_free( sie->si_provideruri );
|
||||
}
|
||||
if ( sie->si_provideruri_bv ) {
|
||||
ber_bvarray_free( sie->si_provideruri_bv );
|
||||
if ( !BER_BVISNULL( &sie->si_provideruri ) ) {
|
||||
ch_free( sie->si_provideruri.bv_val );
|
||||
}
|
||||
if ( sie->si_binddn ) {
|
||||
ch_free( sie->si_binddn );
|
||||
|
Loading…
Reference in New Issue
Block a user