mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-28 02:29:34 -05:00
work around the last issue: some times the result times out while the other party is not willing to send any response; give it a second chance
This commit is contained in:
parent
842b5ce076
commit
6b035aac3e
2 changed files with 21 additions and 6 deletions
|
|
@ -314,7 +314,9 @@ meta_back_single_dobind(
|
|||
metasingleconn_t *msc = &mc->mc_conns[ candidate ];
|
||||
int rc;
|
||||
struct berval cred = BER_BVC( "" );
|
||||
int msgid;
|
||||
int msgid,
|
||||
rebinding = 0,
|
||||
save_nretries = nretries;
|
||||
|
||||
/*
|
||||
* Otherwise an anonymous bind is performed
|
||||
|
|
@ -362,7 +364,17 @@ retry:;
|
|||
}
|
||||
|
||||
rc = LDAP_BUSY;
|
||||
break;
|
||||
if ( rebinding ) {
|
||||
break;
|
||||
}
|
||||
|
||||
/* FIXME: some times the request times out
|
||||
* while the other party is not willing to
|
||||
* send a response any more. Give it a second
|
||||
* chance with a freshly bound connection */
|
||||
rebinding = 1;
|
||||
nretries = save_nretries;
|
||||
/* fallthru */
|
||||
|
||||
case -1:
|
||||
ldap_get_option( msc->msc_ld,
|
||||
|
|
|
|||
|
|
@ -837,9 +837,12 @@ suffix_massage_regexize( const char *s )
|
|||
p = r + 1, i++ )
|
||||
;
|
||||
|
||||
res = ch_calloc( sizeof( char ), strlen( s ) + 4 + 4*i + 1 );
|
||||
res = ch_calloc( sizeof( char ),
|
||||
strlen( s )
|
||||
+ STRLENOF( "(.+,)?" )
|
||||
+ STRLENOF( "[ ]?" ) * i + 1 );
|
||||
|
||||
ptr = lutil_strcopy( res, "(.*)" );
|
||||
ptr = lutil_strcopy( res, "(.+,)?" );
|
||||
for ( i = 0, p = s;
|
||||
( r = strchr( p, ',' ) ) != NULL;
|
||||
p = r + 1 , i++ ) {
|
||||
|
|
@ -863,13 +866,13 @@ suffix_massage_patternize( const char *s )
|
|||
|
||||
len = strlen( s );
|
||||
|
||||
res = ch_calloc( sizeof( char ), len + sizeof( "%1" ) );
|
||||
res = ch_calloc( sizeof( char ), len + STRLENOF( "%1" ) + 1 );
|
||||
if ( res == NULL ) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
strcpy( res, "%1" );
|
||||
strcpy( res + sizeof( "%1" ) - 1, s );
|
||||
strcpy( &res[ STRLENOF( "%1" ) ], s );
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue