|
From: Derrick 'd. H. <dm...@dm...> - 2002-06-28 20:56:28
|
On Thu, Jun 27, 2002 at 07:41:16PM +0200, Michael Str=F6der wrote:
| While digging into the performance issues with
| ldap.ldapobject.LDAPObject.result() I noticed that the original C
| module's result() method does not return results if called with
| all=3D1. See the test script attached.
| Hope to find a contributor with C knowledge who has some spare
| cycles to track that down...
--- LDAPObject.c.orig Fri Jun 28 15:59:11 2002
+++ LDAPObject.c Fri Jun 28 15:59:37 2002
@@ -818,7 +818,7 @@
e =3D "ldap_parse_result";
return LDAPerror( self->ldap, e );
}
- pmsg =3D Py_None;
+ pmsg =3D LDAPmessage_to_python( self->ldap, msg );
}
=20
result_str =3D LDAPconstant( res_type );
It really does help to not ignore the data that's returned :-).
I haven't thoroughly tested it (actually, I haven't tested any more
than the script you supplied tests it, except that I explicitly added
the 'all' and 'timeout' arguments), but it looks correct and seems to
work.
(the patch is against 2.0.0pre04, but is easy enough to do manually if
CVS has different line numbers)
-D
--=20
"Wipe Info uses hexadecimal values to wipe files. This provides more=20
security than wiping with decimal values." -- Norton SystemWorks 2002 Manual
=20
http://dman.ddts.net/~dman/
|