[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
RE: ldapsearch problems (ITS#2490)
This is a multi-part message in MIME format.
------=_NextPart_000_0024_01C31DA8.90BAD360
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
A fix has been committed to CVS HEAD. Please try the attached patch to
libraries/liblber/io.c and let us know your results.
-- Howard Chu
Chief Architect, Symas Corp. Director, Highland Sun
http://www.symas.com http://highlandsun.com/hyc
Symas: Premier OpenSource Development and Support
> -----Original Message-----
> From: owner-openldap-bugs@OpenLDAP.org
> [mailto:owner-openldap-bugs@OpenLDAP.org]On Behalf Of peter@adpm.de
> Sent: Tuesday, May 06, 2003 1:12 AM
> To: openldap-its@OpenLDAP.org
> Subject: ldapsearch problems (ITS#2490)
>
>
> Full_Name: Peter Marschall
> Version: 2.1.17
> OS: Linux 2.4.16
> URL:
> Submission from: (NULL) (213.68.23.10)
>
>
> I am facing problems with ldapsearch.
> When doing a really large search (50.000 entries, 40 MByte)
> against a directory
> server
> ldapsearch behaves different when the output is redirected to
> a file and when
> the output goes to the screen.
> In the first case (output redirected to a file) ldapsearch
> fails with the error
> ldap_result: Can't contact LDAP server (81)
> after reading only a part of the expected results.
> In the second case (output goes to the screen), the results
> are the full results
> of the search.
------=_NextPart_000_0024_01C31DA8.90BAD360
Content-Type: text/plain;
name="dif.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="dif.txt"
Index: io.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/libraries/liblber/io.c,v
retrieving revision 1.70.2.10
diff -u -r1.70.2.10 io.c
--- io.c 26 Apr 2003 14:56:37 -0000 1.70.2.10
+++ io.c 19 May 2003 08:39:58 -0000
@@ -540,13 +540,18 @@
}
/* Did we run out of bytes? */
if ((char *)p == ber->ber_rwptr) {
+#if defined( EWOULDBLOCK )
+ errno = EWOULDBLOCK;
+#elif defined( EAGAIN )
+ errno = EAGAIN;
+#endif
return LBER_DEFAULT;
}
}
+ if (sblen == 1) continue;
+
ber->ber_tag = tag;
ber->ber_ptr = (char *)p;
-
- if (sblen == 1) continue;
}
/* Now look for the length */
@@ -559,6 +564,11 @@
}
/* Not enough bytes? */
if (ber->ber_rwptr - ber->ber_ptr < llen) {
+#if defined( EWOULDBLOCK )
+ errno = EWOULDBLOCK;
+#elif defined( EAGAIN )
+ errno = EAGAIN;
+#endif
return LBER_DEFAULT;
}
for (i=0;
------=_NextPart_000_0024_01C31DA8.90BAD360--