Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Zhang Huangbin
Michael Ströder wrote: > This patch seems to work (already installed at your site ;-). > > Ciao, Michael. > > Index: Modules/ldapcontrol.c > === > RCS file: /cvsroot/python-ldap/python-ldap/Modules/ldapcontrol.c,v > retrieving revision

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Zhang Huangbin
Michael Ströder wrote: > This patch seems to work (already installed at your site ;-). > > Ciao, Michael. > > Index: Modules/ldapcontrol.c > === > RCS file: /cvsroot/python-ldap/python-ldap/Modules/ldapcontrol.c,v > retrieving revision

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Zhang Huangbin
Michael Ströder wrote: > This patch seems to work (already installed at your site ;-). > Ciao, Michael. > > Index: Modules/ldapcontrol.c > === > RCS file: /cvsroot/python-ldap/python-ldap/Modules/ldapcontrol.c,v > retrieving revision 1

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Michael Ströder
Zhang Huangbin wrote: > Michael Ströder wrote: >> Thanks to Zhang Huangbin for giving me access to his machine for testing. >> So I could track it down. It seems to work with the patch below which I >> committed to CVS HEAD. > > Hi, Michael. Thanks for your quick response and hard work :) > > But

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Zhang Huangbin
Michael Ströder wrote: > Thanks to Zhang Huangbin for giving me access to his machine for testing. > So I could track it down. It seems to work with the patch below which I > committed to CVS HEAD. Hi, Michael. Thanks for your quick response and hard work :) But i got new error (ldap.NO_MEMORY) h

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Michael Ströder
Zhang Huangbin wrote: > Michael Ströder wrote: >> Could somebody with more knowledge of C programming please review >> function encode_rfc2696() in Modules/ldapcontrol.c? >> >> The following var declaration could be problematic on 64-bit systems: >> >> unsigned long size; Thanks to Zhang Huang

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Michael Ströder
Zhang Huangbin wrote: > Michael Ströder wrote: >> Could somebody with more knowledge of C programming please review >> function encode_rfc2696() in Modules/ldapcontrol.c? >> >> The following var declaration could be problematic on 64-bit systems: >> >> unsigned long size; >> >> Another issue co

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Zhang Huangbin
Michael Ströder wrote: > Could somebody with more knowledge of C programming please review > function encode_rfc2696() in Modules/ldapcontrol.c? > > The following var declaration could be problematic on 64-bit systems: > > unsigned long size; > > Another issue could be in decode_rfc2696() (whic

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Michael Ströder
Michael Ströder wrote: > Zhang Huangbin wrote: >> Michael Ströder wrote: >>> To all of the people experiencing problems: >>> Could you please run Demo/page_control.py after applying the attached >>> patch (which enables debug logging). >> Here is output msg: > > So this seems to boil down to that

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Zhang Huangbin
Michael Ströder wrote: > So this seems to boil down to that the following commands (lines > wrapped) would fail at your site instead of returning the encoded > control tuple: > > import ldap from ldap.controls import SimplePagedResultsControl > SimplePagedResultsCont

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Michael Ströder
Zhang Huangbin wrote: > Michael Ströder wrote: >> To all of the people experiencing problems: >> Could you please run Demo/page_control.py after applying the attached >> patch (which enables debug logging). > > Here is output msg: So this seems to boil down to that the following commands (lines w

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Zhang Huangbin
Michael Ströder wrote: > To all of the people experiencing problems: > Could you please run Demo/page_control.py after applying the attached > patch (which enables debug logging). > > Index: Demo/page_control.py > === > RCS file: /cvsr

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Michael Ströder
Zhang Huangbin wrote: > I had the same error here while run Demo/page_control.py: To all of the people experiencing problems: Could you please run Demo/page_control.py after applying the attached patch (which enables debug logging). To preclude problems in the 64-bit build of OpenLDAP client lib

Re: ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

2009-03-16 Thread Michael Ströder
Zhang Huangbin wrote: > Zhang Huangbin wrote: >> Strange, the same code (Demo/page_control.py) works in: >> >> - OS: CentOS 5.2, *i386* >> - Python: 2.4.3-21.el5 (shipped within CentOS) >> - python-ldap: 2.3.6 (installed from source tarball) >> - OpenLDAP: 2.3.27-8.el5_2.4 >> > How can i help devel