[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: ldap_search_s hangs with ms active directory

Thank you sir.I understand what you meant.I did set the option and the first search returned immediately.But the 2nd search took a long time.I do not know how to seperate this search reference or to explicitly handle this.Could you kindly provide some sample code ( a few lines) or a pointer to any, so that I can get a better insight into this?

Thank you and I appreciate your help,

----- Original Message ----- From: "Pierangelo Masarati" <ando@sys-net.it>
To: "Sankhadip Sengupta" <shanks.iit@gmail.com>
Cc: <openldap-technical@openldap.org>
Sent: Saturday, February 07, 2009 3:12 AM
Subject: Re: ldap_search_s hangs with ms active directory

Sankhadip Sengupta wrote:
Thank you sir for you reply.So I tried that again and this time the search worked but after 6 mins or something it returned the result.

Is there any way to bypass this delay or to avoid the referrals? I do set an option like

ldap_set_option(ld,LDAP_SET_REFERRALS,&times) where times=0 so stop referrrals.

I don't see any LDAP_SET_REFERRALS in OpenLDAP code. You're supposed to use

ldap_set_option( ld, LDAP_OPT_REFERRALS, LDAP_OPT_OFF )

to disable them in your code. This needs to be set before you run operations that could return a referral. You should then be prepared to receive explicit referrals or search references (either LDAP_REFERRAL return code at end of operation, or LDAP_RES_SEARCH_REFERENCE return code in intermediate responses to searche requests).


Ing. Pierangelo Masarati OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Fax:     +39 0382 476497
Email:   ando@sys-net.it