More debug code is added to the wrapper: 
=======================================
static int ldap_simple_bind_ext_s( LDAP *ld, const char *dn, const char 
*passwd, struct timeval *timeout ) 
{
        int             msgid;
        LDAPMessage     *result;

            LOGINFO("debug ldap_simple_bind_ext_s timeout = %d ", 
timeout->tv_sec );

        if ( ld == NULL ) {
                return( LDAP_PARAM_ERROR );
        }

            LOGINFO("debug ldap_simple_bind_ext_s --1" );

        if ( (msgid = ldap_simple_bind( ld, dn, passwd )) == -1 )
                return( ldap_get_lderrno( ld, NULL, NULL ) );

            LOGINFO("debug ldap_simple_bind_ext_s --2 ");

        if ( ldap_result( ld, msgid, 1, timeout, &result ) == -1 )
                return( ldap_get_lderrno( ld, NULL, NULL ) );

            LOGINFO("debug ldap_simple_bind_ext_s --3" );

        return( ldap_result2error( ld, result, 1 ) ); 
}
=======================================
Just want to get a better understanding of the process. 

The log is quite confusing: 
=======================================
<distribution> (Fri Sep 11 2009 16:49:07.584) 
<p13664,t813147760,aba_ldap_interface.c,1394>
     INFO>> Secure Login
<distribution> (Fri Sep 11 2009 16:49:07.584) 
<p13664,t813147760,aba_ldap_interface.c,5884>
     INFO>> debug ldap_simple_bind_ext_s timeout = 10 
<distribution> (Fri Sep 11 2009 16:49:07.584) 
<p13664,t813147760,aba_ldap_interface.c,5888>
     INFO>> debug ldap_simple_bind_ext_s --1
=======================================
It seems ldap_result() was not called. Isn't ldap_simple_bind() async func? Why 
does it behave like the sync one ldap_simple_bind_s()?

Thanks,
Xu Qiang
_______________________________________________
dev-tech-ldap mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-ldap

Reply via email to