#define LDAP_CONNST_CONNECTING 2
#define LDAP_CONNST_CONNECTED 3
LDAPURLDesc *lconn_server;
+#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
char *lconn_krbinstance;
+#endif
struct ldap_conn *lconn_next;
BerElement *lconn_ber;/* ber receiving on this conn. */
} LDAPConn;
}
#endif
- if ( conn->lconn_krbinstance != NULL ) {
#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
+ if ( conn->lconn_krbinstance == NULL ) {
char *c;
conn->lconn_krbinstance = ldap_host_connected_to( conn->sb );
( c = strchr( conn->lconn_krbinstance, '.' )) != NULL ) {
*c = '\0';
}
-#else /* LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND */
- conn->lconn_krbinstance = NULL;
-#endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND */
}
+#endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND */
return( 0 );
}
prevlc = tmplc;
}
ldap_free_urllist( lc->lconn_server );
+#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
if ( lc->lconn_krbinstance != NULL ) {
LDAP_FREE( lc->lconn_krbinstance );
}
+#endif
if ( lc->lconn_sb != ld->ld_sb ) {
ber_sockbuf_free( lc->lconn_sb );
}