ldap/servers/slapd/daemon.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 354249c1255c6b616e7821bb7615bccea8b395bf
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Thu Jul 7 17:40:25 2011 -0700
Bug 712855 - Directory Server 8.2 logs "Netscape Portable
Runtime error -5961 (TCP connection reset by
peer.)" to error log whereas Directory Server
8.1 did not
https://bugzilla.redhat.com/show_bug.cgi?id=712855
Description: In write_function, all failures of PR_Write except
PR_WOULD_BLOCK_ERROR and PR_IO_TIMEOUT_ERROR were logged. This
patch changes it so that PR_CONNECT_RESET_ERROR (TCP connection
reset by peer) will not be logged since it is not an error.
diff --git a/ldap/servers/slapd/daemon.c b/ldap/servers/slapd/daemon.c
index 312db6a..a6ed94f 100644
--- a/ldap/servers/slapd/daemon.c
+++ b/ldap/servers/slapd/daemon.c
@@ -1716,9 +1716,12 @@ write_function( int ignore, const void *buffer, int count, struct
lextiof_socket
SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
fd, prerr, slapd_pr_strerror( prerr ));
if ( !SLAPD_PR_WOULD_BLOCK_ERROR(prerr)) {
- LDAPDebug(LDAP_DEBUG_ANY, "PR_Write(%d) "
- SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n",
- fd, prerr, slapd_pr_strerror( prerr ));
+ if (prerr != PR_CONNECT_RESET_ERROR) {
+ /* 'TCP connection reset by peer': no need to log */
+ LDAPDebug(LDAP_DEBUG_ANY, "PR_Write(%d) "
+ SLAPI_COMPONENT_NAME_NSPR " error %d
(%s)\n",
+ fd, prerr, slapd_pr_strerror( prerr ));
+ }
if (sentbytes < count) {
LDAPDebug(LDAP_DEBUG_CONNS,
"PR_Write(%d) - wrote only %d bytes (expected %d
bytes) - 0 (EOF)\n", /* disconnected */