October 4th, 2004, 05:29 AM
Problem with ldap_get_option
the function ldap_get_option always returns the error code res=0x59 (LDAP_PARAM_ERROR=A bad parameter was passed to a routine) The code looks the following:
int value, res;
pLDAP = ldap_init(NULL,LDAP_PORT);
ldap_simple_bind_s(pLDAP, "...", "...");
res = ldap_get_option(pLDAP, LDAP_OPT_SIZELIMIT, &value);
The simple_bind_s - function was successful ("..." is replaced by a user and a password). Does somebody has an idea how to avoid the error code and get (or set) an option?
October 4th, 2004, 12:23 PM
If I remember right I believe ldap_set_option is suppose to be sent before a bind is made, but since this is a get I'd assume it should work. Perhaps try it above the bind?
October 5th, 2004, 01:21 AM
I tried to call the ldap_get_option function above the bind. But the reaction was the same :(
October 5th, 2004, 11:43 AM
to be honest I haven't used it within C yet so I can't test it :(
I'll move this over to the C fourm and perhaps someone there can knows the problem