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 developers fix this

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:

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 wrapped)

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 the following

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 could be in

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 Huangbin for

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)

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 i got new

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.10

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.10