*/
#define META_MSGID_IGNORE (-1)
#define META_MSGID_NEED_BIND (-2)
+#define META_MSGID_CONNECTING (-3)
static int
meta_send_entry(
META_SEARCH_NOT_CANDIDATE,
META_SEARCH_CANDIDATE,
META_SEARCH_BINDING,
- META_SEARCH_NEED_BIND
+ META_SEARCH_NEED_BIND,
+ META_SEARCH_CONNECTING
} meta_search_candidate_t;
/*
case LDAP_X_CONNECTING:
/* must retry, same conn */
- candidates[ candidate ].sr_msgid = META_MSGID_NEED_BIND;
+ candidates[ candidate ].sr_msgid = META_MSGID_CONNECTING;
ldap_pvt_thread_mutex_lock( &mi->mi_conninfo.lai_mutex );
LDAP_BACK_CONN_BINDING_CLEAR( msc );
ldap_pvt_thread_mutex_unlock( &mi->mi_conninfo.lai_mutex );
- return META_SEARCH_NEED_BIND;
+ return META_SEARCH_CONNECTING;
case LDAP_SERVER_DOWN:
down:;
++needbind;
/* fallthru */
+ case META_SEARCH_CONNECTING:
case META_SEARCH_CANDIDATE:
case META_SEARCH_BINDING:
candidates[ i ].sr_type = REP_INTERMEDIATE;
}
/* if target still needs bind, retry */
- if ( candidates[ i ].sr_msgid == META_MSGID_NEED_BIND ) {
+ if ( candidates[ i ].sr_msgid == META_MSGID_NEED_BIND
+ || candidates[ i ].sr_msgid == META_MSGID_CONNECTING )
+ {
/* initiate dobind */
retcode = meta_search_dobind_init( op, rs, &mc, i, candidates );
alreadybound--;
/* fallthru */
+ case META_SEARCH_CONNECTING:
case META_SEARCH_BINDING:
break;
continue;
case META_SEARCH_BINDING:
+ case META_SEARCH_CONNECTING:
case META_SEARCH_NEED_BIND:
case META_SEARCH_UNDEFINED:
assert( 0 );