}
} return LDAP_OPT_SUCCESS;
- /* Only accessed from inside this function by ldap_set_rebind_proc() */
- case LDAP_OPT_REBIND_PROC: {
- lo->ldo_rebind_proc = (LDAP_REBIND_PROC *)invalue;
- } return LDAP_OPT_SUCCESS;
- case LDAP_OPT_REBIND_PARAMS: {
- lo->ldo_rebind_params = (void *)invalue;
- } return LDAP_OPT_SUCCESS;
-
- /* Only accessed from inside this function by ldap_set_nextref_proc() */
- case LDAP_OPT_NEXTREF_PROC: {
- lo->ldo_nextref_proc = (LDAP_NEXTREF_PROC *)invalue;
- } return LDAP_OPT_SUCCESS;
- case LDAP_OPT_NEXTREF_PARAMS: {
- lo->ldo_nextref_params = (void *)invalue;
- } return LDAP_OPT_SUCCESS;
- }
-
- if(invalue == NULL) {
- /* no place to set from */
- return LDAP_OPT_ERROR;
- }
-
- /* options which cannot withstand invalue == NULL */
-
- switch(option) {
- case LDAP_OPT_API_INFO:
- case LDAP_OPT_DESC:
- /* READ ONLY */
- break;
-
- case LDAP_OPT_DEREF:
- lo->ldo_deref = * (const int *) invalue;
- return LDAP_OPT_SUCCESS;
-
- case LDAP_OPT_SIZELIMIT:
- lo->ldo_sizelimit = * (const int *) invalue;
- return LDAP_OPT_SUCCESS;
-
- case LDAP_OPT_TIMELIMIT:
- lo->ldo_timelimit = * (const int *) invalue;
- return LDAP_OPT_SUCCESS;
-
- case LDAP_OPT_PROTOCOL_VERSION: {
- int vers = * (const int *) invalue;
- if (vers < LDAP_VERSION_MIN || vers > LDAP_VERSION_MAX) {
- /* not supported */
- break;
- }
- lo->ldo_version = vers;
- } return LDAP_OPT_SUCCESS;
-
-
case LDAP_OPT_HOST_NAME: {
const char *host = (const char *) invalue;
LDAPURLDesc *ludlist = NULL;
return rc;
}
+ /* Only accessed from inside this function by ldap_set_rebind_proc() */
+ case LDAP_OPT_REBIND_PROC: {
+ lo->ldo_rebind_proc = (LDAP_REBIND_PROC *)invalue;
+ } return LDAP_OPT_SUCCESS;
+ case LDAP_OPT_REBIND_PARAMS: {
+ lo->ldo_rebind_params = (void *)invalue;
+ } return LDAP_OPT_SUCCESS;
+
+ /* Only accessed from inside this function by ldap_set_nextref_proc() */
+ case LDAP_OPT_NEXTREF_PROC: {
+ lo->ldo_nextref_proc = (LDAP_NEXTREF_PROC *)invalue;
+ } return LDAP_OPT_SUCCESS;
+ case LDAP_OPT_NEXTREF_PARAMS: {
+ lo->ldo_nextref_params = (void *)invalue;
+ } return LDAP_OPT_SUCCESS;
+ }
+
+ if(invalue == NULL) {
+ /* no place to set from */
+ return LDAP_OPT_ERROR;
+ }
+
+ /* options which cannot withstand invalue == NULL */
+
+ switch(option) {
+ case LDAP_OPT_API_INFO:
+ case LDAP_OPT_DESC:
+ /* READ ONLY */
+ break;
+
+ case LDAP_OPT_DEREF:
+ lo->ldo_deref = * (const int *) invalue;
+ return LDAP_OPT_SUCCESS;
+
+ case LDAP_OPT_SIZELIMIT:
+ lo->ldo_sizelimit = * (const int *) invalue;
+ return LDAP_OPT_SUCCESS;
+
+ case LDAP_OPT_TIMELIMIT:
+ lo->ldo_timelimit = * (const int *) invalue;
+ return LDAP_OPT_SUCCESS;
+
+ case LDAP_OPT_PROTOCOL_VERSION: {
+ int vers = * (const int *) invalue;
+ if (vers < LDAP_VERSION_MIN || vers > LDAP_VERSION_MAX) {
+ /* not supported */
+ break;
+ }
+ lo->ldo_version = vers;
+ } return LDAP_OPT_SUCCESS;
+
case LDAP_OPT_ERROR_NUMBER: {
int err = * (const int *) invalue;
BerElement *ber,
ber_int_t msgid)
{
- LDAPURLDesc *servers;
int rc;
Debug( LDAP_DEBUG_TRACE, "ldap_send_initial_request\n", 0, 0, 0 );
0, 0, 0 );
}
- {
- /*
- * use of DNS is turned off or this is an X.500 DN...
- * use our default connection
- */
- servers = NULL;
- }
-
#ifdef LDAP_CONNECTIONLESS
if (LDAP_IS_UDP(ld)) {
if (msgtype == LDAP_REQ_BIND) {
ldap_pvt_thread_mutex_lock( &ld->ld_req_mutex );
#endif
rc = ldap_send_server_request( ld, ber, msgid, NULL,
- servers, NULL, NULL );
+ NULL, NULL, NULL );
#ifdef LDAP_R_COMPILE
ldap_pvt_thread_mutex_unlock( &ld->ld_req_mutex );
#endif
- if (servers)
- ldap_free_urllist(servers);
return(rc);
}