#define LDAP_BACK_FCONN_ISTLS (0x00000008U)
#define LDAP_BACK_FCONN_BINDING (0x00000010U)
#define LDAP_BACK_FCONN_TAINTED (0x00000020U)
-#define LDAP_BACK_FCONN_ISIDASR (0x00000040U)
-#define LDAP_BACK_FCONN_CACHED (0x00000080U)
+#define LDAP_BACK_FCONN_ABANDON (0x00000040U)
+#define LDAP_BACK_FCONN_ISIDASR (0x00000080U)
+#define LDAP_BACK_FCONN_CACHED (0x00000100U)
#define LDAP_BACK_CONN_ISBOUND(lc) LDAP_BACK_CONN_ISSET((lc), LDAP_BACK_FCONN_ISBOUND)
#define LDAP_BACK_CONN_ISBOUND_SET(lc) LDAP_BACK_CONN_SET((lc), LDAP_BACK_FCONN_ISBOUND)
#define LDAP_BACK_CONN_TAINTED(lc) LDAP_BACK_CONN_ISSET((lc), LDAP_BACK_FCONN_TAINTED)
#define LDAP_BACK_CONN_TAINTED_SET(lc) LDAP_BACK_CONN_SET((lc), LDAP_BACK_FCONN_TAINTED)
#define LDAP_BACK_CONN_TAINTED_CLEAR(lc) LDAP_BACK_CONN_CLEAR((lc), LDAP_BACK_FCONN_TAINTED)
+#define LDAP_BACK_CONN_ABANDON(lc) LDAP_BACK_CONN_ISSET((lc), LDAP_BACK_FCONN_ABANDON)
+#define LDAP_BACK_CONN_ABANDON_SET(lc) LDAP_BACK_CONN_SET((lc), LDAP_BACK_FCONN_ABANDON)
+#define LDAP_BACK_CONN_ABANDON_CLEAR(lc) LDAP_BACK_CONN_CLEAR((lc), LDAP_BACK_FCONN_ABANDON)
#define LDAP_BACK_CONN_ISIDASSERT(lc) LDAP_BACK_CONN_ISSET((lc), LDAP_BACK_FCONN_ISIDASR)
#define LDAP_BACK_CONN_ISIDASSERT_SET(lc) LDAP_BACK_CONN_SET((lc), LDAP_BACK_FCONN_ISIDASR)
#define LDAP_BACK_CONN_ISIDASSERT_CLEAR(lc) LDAP_BACK_CONN_CLEAR((lc), LDAP_BACK_FCONN_ISIDASR)
#define LDAP_BACK_F_USE_TLS (0x00000002U)
#define LDAP_BACK_F_PROPAGATE_TLS (0x00000004U)
#define LDAP_BACK_F_TLS_CRITICAL (0x00000008U)
-#define LDAP_BACK_F_TLS_LDAPS (0x00000010U)
+#define LDAP_BACK_F_TLS_LDAPS (0x00000010U)
#define LDAP_BACK_F_TLS_USE_MASK (LDAP_BACK_F_USE_TLS|LDAP_BACK_F_TLS_CRITICAL)
#define LDAP_BACK_F_TLS_PROPAGATE_MASK (LDAP_BACK_F_PROPAGATE_TLS|LDAP_BACK_F_TLS_CRITICAL)
}
/* check for abandon */
- if ( op->o_abandon ) {
+ if ( op->o_abandon || LDAP_BACK_CONN_ABANDON( mc ) ) {
break;
}
}
/* check for abandon */
- if ( op->o_abandon || doabandon ) {
+ if ( op->o_abandon || LDAP_BACK_CONN_ABANDON( mc ) ) {
for ( i = 0; i < mi->mi_ntargets; i++ ) {
if ( candidates[ i ].sr_msgid >= 0 ) {
if ( META_IS_BINDING( &candidates[ i ] ) ) {
if ( op->o_abandon ) {
rc = SLAPD_ABANDON;
- /* let send_ldap_result play cleanup handlers (ITS#4645) */
- break;
}
+
+ /* let send_ldap_result play cleanup handlers (ITS#4645) */
+ break;
}
/* if no entry was found during this loop,
lutil_timermul( &save_tv, 2, &save_tv );
}
-#if 0
- if ( LogTest( LDAP_DEBUG_TRACE ) ) {
- char buf[ SLAP_TEXT_BUFLEN ];
-
- snprintf( buf, sizeof( buf ), "%s %ld.%06ld %d/%d mc=%p",
- op->o_log_prefix, save_tv.tv_sec, save_tv.tv_usec,
- ncandidates, initial_candidates, mc );
- Debug( LDAP_DEBUG_TRACE, "### %s\n", buf, 0, 0 );
- for ( i = 0; i < mi->mi_ntargets; i++ ) {
- if ( candidates[ i ].sr_msgid == META_MSGID_IGNORE ) {
- continue;
- }
-
- snprintf( buf, sizeof( buf ), "[%ld] ld=%p%s%s\n",
- i,
- mc->mc_conns[ i ].msc_ld,
- ( candidates[ i ].sr_msgid == META_MSGID_NEED_BIND ) ? " needbind" : "",
- META_IS_BINDING( &candidates[ i ] ) ? " binding" : "" );
- Debug( LDAP_DEBUG_TRACE, "### %s\n", buf, 0, 0 );
- }
- }
-#endif
-
if ( alreadybound == 0 ) {
-#if 0
- Debug( LDAP_DEBUG_TRACE, "### %s select(%ld.%06ld)\n",
- op->o_log_prefix, save_tv.tv_sec, save_tv.tv_usec );
-#endif
tv = save_tv;
(void)select( 0, NULL, NULL, NULL, &tv );
matched = op->o_bd->be_suffix[ 0 ].bv_val;
}
-#if 0
- {
- char buf[ SLAP_TEXT_BUFLEN ];
- char cnd[ SLAP_TEXT_BUFLEN ];
- int i;
-
- for ( i = 0; i < mi->mi_ntargets; i++ ) {
- if ( META_IS_CANDIDATE( &candidates[ i ] ) ) {
- cnd[ i ] = '*';
- } else {
- cnd[ i ] = ' ';
- }
- }
- cnd[ i ] = '\0';
-
- snprintf( buf, sizeof( buf ), "%s meta_back_search: is_scope=%d is_ok=%d cnd=\"%s\"\n",
- op->o_log_prefix, initial_candidates, is_ok, cnd );
-
- Debug( LDAP_DEBUG_ANY, "%s", buf, 0, 0 );
- }
-#endif
-
/*
* In case we returned at least one entry, we return LDAP_SUCCESS
* otherwise, the latter error code we got