ldap.ENCODING_ERROR when trying to use SimplePageResultsControl

Zhang Huangbin zhbmaillistonly at gmail.com
Mon Mar 16 19:23:48 CET 2009


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
> diff -u -r1.10 ldapcontrol.c
> --- Modules/ldapcontrol.c	16 Mar 2009 14:54:55 -0000	1.10
> +++ Modules/ldapcontrol.c	16 Mar 2009 17:29:04 -0000
> @@ -300,11 +300,13 @@
>      ber_tag_t tag;
>      struct berval *cookiep;
>      unsigned long count;
> +    Py_ssize_t ldctl_value_len;
>
>      if (!PyArg_ParseTuple(args, "s#:decode_page_control",
>                            &ldctl_value.bv_val, &ldctl_value.bv_len)) {
>          goto endlbl;
>      }
> +    ldctl_value.bv_len = (ber_len_t) ldctl_value_len;
>
>      if (!(ber = ber_init(&ldctl_value))) {
>          LDAPerr(LDAP_NO_MEMORY);
>
>
>   

So great, it works now.

Big thanks, Michael. :)


-- 
Best regards.

Zhang Huangbin

- Open Source Mail Server Solution for RHEL/CentOS 5.x:
  http://code.google.com/p/iredmail/




More information about the python-ldap mailing list