BerElement *ber;
int i, err, sendabandon;
Sockbuf *sb;
-#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS
LDAPRequest *lr;
-#endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS */
/*
* An abandon request looks like this:
sendabandon = 1;
-#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS
/* find the request that we are abandoning */
for ( lr = ld->ld_requests; lr != NULL; lr = lr->lr_next ) {
if ( lr->lr_msgid == msgid ) { /* this message */
sendabandon = 0;
}
}
-#endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS */
if ( ldap_msgdelete( ld, msgid ) == 0 ) {
ld->ld_errno = LDAP_SUCCESS;
} else {
/* send the message */
-#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS
if ( lr != NULL ) {
sb = lr->lr_conn->lconn_sb;
- } else
-#endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS */
- {
+ } else {
sb = &ld->ld_sb;
}
}
}
-#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS
if ( lr != NULL ) {
if ( sendabandon ) {
ldap_free_connection( ld, lr->lr_conn, 0, 1 );
ldap_free_request( ld, lr );
}
}
-#endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS */
-
if ( ld->ld_abandoned == NULL ) {
if ( (ld->ld_abandoned = (int *) malloc( 2 * sizeof(int) ))