>From e05698fa4e949bba101c5574741064fa8b150367 Mon Sep 17 00:00:00 2001
From: Nathan Kinder <nkinder@redhat.com>
Date: Wed, 9 Dec 2009 14:25:38 -0800
Subject: [PATCH] Bug 497556 - LDAPI connections cause TCP performance degradation

If a slot from the connection table had previously been used for
an LDAPI connection, it would cause serious performance degradation
(20 times worse on my system) to a TCP connection that reused the
same slot.  The problem was that we were not clearing the flag
that indicates that a connection is a UNIX local socket in the
connection cleanup function.  Clearing this flag makes the reused
slots perform as expected.
---
 ldap/servers/slapd/connection.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/ldap/servers/slapd/connection.c b/ldap/servers/slapd/connection.c
index 57028de..a52ba21 100644
--- a/ldap/servers/slapd/connection.c
+++ b/ldap/servers/slapd/connection.c
@@ -196,6 +196,7 @@ connection_cleanup(Connection *conn)
 	conn->c_prev= NULL;
 	conn->c_extension= NULL;
 	conn->c_ssl_ssf = 0; 
+	conn->c_unix_local = 0;
 	/* remove any SASL I/O from the connection */
 	sasl_io_cleanup(conn);
 	sasl_dispose((sasl_conn_t**)&conn->c_sasl_conn);
-- 
1.6.2.5

