Bug in LDAPObject.c, l_ldap_result()

Michael Ströder michael at stroeder.com
Sat Jun 29 16:32:52 CEST 2002


Derrick 'dman' Hudson wrote:
 >
> --- LDAPObject.c.orig   Fri Jun 28 15:59:11 2002
> +++ LDAPObject.c        Fri Jun 28 15:59:37 2002
> @@ -818,7 +818,7 @@
>                 e = "ldap_parse_result";
>             return LDAPerror( self->ldap, e );
>         }
> -       pmsg = Py_None;
> +       pmsg = LDAPmessage_to_python( self->ldap, msg );
>      }
>  
>      result_str = LDAPconstant( res_type );
> 
> 
> It really does help to not ignore the data that's returned :-).

Oh, yes.

> I haven't thoroughly tested it

You already noticed the issues with web2ldap. One has to fix two 
other parts of python-ldap for this patch to work with web2ldap.

I've checked in Modules/LDAPObject.c Lib/ldap/ldapobject.py 
Lib/ldap/async.py. Now the C module's result() is directly wrapped 
and LDAPObject.c contains the fix above.

I guess I will add a derived class for the non-blocking version of 
LDAPObject.result(). So everyone will be free to choose.

Ciao, Michael.






More information about the python-ldap mailing list