Re: LDAP_SUCCES on ldap_search_ext when host is unreachable

[email protected] Wed, 9 Oct 2013 05:47:14 -0700 (PDT)
Newsgroups gmane.comp.mozilla.devel.directory
Message-ID <[email protected]>
Hi,

For information, My plateform is CentOS 4. My program operate the switch over when a request don't result LDAP_SUCCESS. I'm not over NSPR but use directly the librairy ldap50.so.

Look this trace, i have add my trace to know the call flow :

ldap_search_ext
put_filter "(& (|(identityAlias=e164:100161353485)(&(identityAlias=e164:100161354485)(!(incomingRouting=0)))) (objectClass=Identity) (!(inactive=1)))"
put_filter: AND
put_filter_list " (|(identityAlias=e164:100161353485)(&(identityAlias=e164:100161354485)(!(incomingRouting=0)))) (objectClass=Identity) (!(inactive=1))"
put_filter "(|(identityAlias=e164:100161353485)(&(identityAlias=e164:100161354485)(!(incomingRouting=0))))"
put_filter: OR
put_filter_list "(identityAlias=e164:100161353485)(&(identityAlias=e164:100161354485)(!(incomingRouting=0)))"
put_filter "(identityAlias=e164:100161353485)"
put_filter: simple
put_simple_filter "identityAlias=e164:100161353485"
put_filter "(&(identityAlias=e164:100161354485)(!(incomingRouting=0)))"
put_filter: AND
put_filter_list "(identityAlias=e164:100161354485)(!(incomingRouting=0))"
put_filter "(identityAlias=e164:100161354485)"
put_filter: simple
put_simple_filter "identityAlias=e164:100161354485"
put_filter "(!(incomingRouting=0))"
put_filter: NOT
put_filter_list "(incomingRouting=0)"
put_filter "(incomingRouting=0)"
put_filter: simple
put_simple_filter "incomingRouting=0"
put_filter "(objectClass=Identity)"
put_filter: simple
put_simple_filter "objectClass=Identity"
put_filter "(!(inactive=1))"
put_filter: NOT
put_filter_list "(inactive=1)"
put_filter "(inactive=1)"
put_filter: simple
put_simple_filter "inactive=1"
nsldapi_send_initial_request
nsldapi_send_server_request
        lc == NULL
        srvlist == NULL
        nsldapi_send_server_request: connection 0x8667cd0 - LDAP_CONNST_CONNECTING -> LDAP_CONNST_CONNECTED ELSE
        Not return before end of nsldapi_send_server_request in request.c
ldap_err2string
        CLEMENT : iLDAPResult == Success || 0 #ldap_search_ext return
ldap_result
nsldapi_result_nolock (msgid=-1, all=1)
=> check_response_queue (msgid=-1, all=1)
<= check_response_queue NOT FOUND
wait4msg (timeout 0 sec, 0 usec)
** Connections:
* 0x8667cd0 - host: 10.165.116.92  port: 389  secure: No  (default)
  refcnt: 3  pending: 0  status: Connected
  last used: Wed Oct  9 12:44:48 2013

** Outstanding Requests:
 * 0x8842418 - msgid 3,  origid 3, status InProgress
   outstanding referrals 0, parent count 0
 * 0x8833f90 - msgid 4,  origid 4, status InProgress
   outstanding referrals 0, parent count 0
** Response Queue:
   Empty
nsldapi_iostatus_poll
ldap_result = 0

I remark that the call flow go to the nsldapi_send_server_request and return msgid. So, different function suppose that is a LDAP_SUCCESS.


For finish, i use one OPTION : LDAP_X_OPT_CONNECT_TIMEOUT = 1000

Thanks
Clement