[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
[Fwd: Re: (ITS#3537) Proxy cache overlay problem.]
-------- Original Message --------
Date: Fri, 04 Mar 2005 12:03:45 +0200
From: Andris Peize <andrisp@hipo.lv>
To: Howard Chu <hyc@symas.com>
Subject: Re: (ITS#3537) Proxy cache overlay problem.
References: <200502111429.j1BET9pP040899@boole.openldap.org>
<4227F390.4030600@symas.com>
In-Reply-To: <4227F390.4030600@symas.com>
Howard Chu wrote:
> andrisp@hipo.lv wrote:
>> Full_Name: Andris Peize
>> Version: 2.2.18-2.2.23
>> OS: FreeBSD 4.8-5.3
>> URL: Submission from: (NULL) (159.148.130.2)
>>> From now on proxy cache will respond with "52 Server is unavailable"
>>> for any
> proxy cache. A fix for the search operation is now in CVS HEAD. A
Thank you, works fine (survived both reset and restart) with following
patch against 2.2.23 (pkg/ldap/servers/slapd/back-ldap/search.c,v
1.113.2.19)
@@ -58,7 +58,6 @@
struct berval mbase;
struct berval mfilter = BER_BVNULL;
int dontfreetext = 0;
- int freeconn = 0;
int do_retry = 1;
dncookie dc;
#ifdef LDAP_BACK_PROXY_AUTHZ
@@ -160,12 +159,18 @@
if ( rs->sr_err != LDAP_SUCCESS ) {
fail:;
- rc = ldap_back_op_result( lc, op, rs, msgid, 0 );
- if ( freeconn ) {
- ldap_back_freeconn( op, lc );
- lc = NULL;
+ if ( rs->sr_err == LDAP_SERVER_DOWN ) {
+ if ( do_retry ) {
+ do_retry = 0;
+ if ( ldap_back_retry( lc, op, rs ) ) {
+ goto retry;
+ }
+ }
+ rc = ldap_back_op_result( lc, op, rs, msgid, 0);
+ ldap_back_freeconn( op, lc );
+ lc = NULL;
+ goto finish;
}
- goto finish;
}
/* We pull apart the ber result, stuff it into a slapd entry, and
@@ -289,9 +294,7 @@
if ( ldap_back_retry( lc, op, rs ))
goto retry;
}
- /* FIXME: invalidate the connection? */
rs->sr_err = LDAP_SERVER_DOWN;
- freeconn = 1;
goto fail;
}
--
-- Howard Chu
Chief Architect, Symas Corp. Director, Highland Sun
http://www.symas.com http://highlandsun.com/hyc
Symas: Premier OpenSource Development and Support