From 34e34c088a74a192ebcbeea9504200bd18eac74f Mon Sep 17 00:00:00 2001 From: wessels <> Date: Fri, 24 Jan 1997 01:31:23 +0000 Subject: [PATCH] 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. --- src/redirect.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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; } -- 2.47.3