From: wessels <> Date: Fri, 24 Jan 1997 01:31:23 +0000 (+0000) Subject: From: B.R.Foster@massey.ac.nz (Brent Foster) X-Git-Tag: SQUID_3_0_PRE1~5171 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=34e34c088a74a192ebcbeea9504200bd18eac74f;p=thirdparty%2Fsquid.git From: B.R.Foster@massey.ac.nz (Brent Foster) Squid currently checks that the redirector is not busy before using it - this change checks if the redirector is alive and not busy. --- diff --git a/src/redirect.cc b/src/redirect.cc index 69fafc35a2..fb0aebb445 100644 --- a/src/redirect.cc +++ b/src/redirect.cc @@ -1,5 +1,5 @@ /* - * $Id: redirect.cc,v 1.32 1997/01/13 23:08:52 wessels Exp $ + * $Id: redirect.cc,v 1.33 1997/01/23 18:31:23 wessels Exp $ * * DEBUG: section 29 Redirector * AUTHOR: Duane Wessels @@ -263,8 +263,11 @@ GetFirstAvailable(void) redirector_t *redirect = NULL; for (k = 0; k < NRedirectors; k++) { redirect = *(redirect_child_table + k); - if (!(redirect->flags & REDIRECT_FLAG_BUSY)) - return redirect; + if (BIT_TEST(redirect->flags, REDIRECT_FLAG_BUSY)) + continue; + if (!BIT_TEST(redirect->flags, REDIRECT_FLAG_ALIVE)) + continue; + return redirect; } return NULL; }