× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Gary,

Did you first call the "ldap_init()" function to initialize the required "ldap" structure? e.g something like:

    ld = ldap_init('server1' ; ldap_port);

Or you may need to call the "ldap_ssl_init()" function to initiate a secure connection with the server, e.g.:

    ld = ldap_ssl_init('server1', ldap_port, cert_label);

I found an older Redbook that may help ...

    ftp://public.dhe.ibm.com/systems/power/docs/systemi/v5r3/en_US/dirserv1.pdf

It explains the requirements vis-a-vis the sequence of API calls needed, etc.

HTH,

Mark S. Waterbury

> On 4/27/2018 3:23 PM, Gary Monnier wrote:
Hi,

I'm trying to set the LDAP_OPT_REFERRALS option off but I keep running
into a "Bad parameter to an ldap routine" error. I've searched the
archives and found two similar questions bu not answers. Doesn't mean the
aren't there I just can't find them so I'm asking too.

IBM's documentation has the following interface:


int ldap_set_option(
LDAP **ld*,
int *optionToSet*,
const void **optionValue* )


I have the following prototype defined:

D ldap_set_option...
D PR 10I 0 EXTPROC('ldap_set_option')
D ldapPointer * value
D LDAP_OPT_REFERRALS...
D 10I 0 value
D ldapOptValue * CONST

D LDAP_OPT_REFERRALS...
D S 10I 0 inz(2)
D ldapOptValue S *
D debugOffValue S 10I 0 inz(0)

/free
.
.
.
debugOffValue = ldapDebugOff;
ldapOptValue = %addr(debugOffValue);
returnCode = ldap_set_option(ldapPointer:
LDAP_OPT_REFERRALS:
ldapOptValue);
.
.
.
/end-free

I've tried other combinations but I keep receiving a return code value of
89 with a message text of "Bad parameter to an ldap routine".

Using

D ldapOptValue * value

results in the same error

What parameter is bad? I can't tell. My guess is parameter 3.

A trace dump is of no use.

ldap_start_operation: ld->ld_ref_count(1)
ldap_end_operation: ld->ld_ref_count(0)
ldap_err2string: err(89)


Does anyone see anything wrong with the way I set up the prototype?

Any suggestions?

T
​hank you,


Gary Monnier



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.