]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
From: B.R.Foster@massey.ac.nz (Brent Foster)
authorwessels <>
Fri, 24 Jan 1997 01:31:23 +0000 (01:31 +0000)
committerwessels <>
Fri, 24 Jan 1997 01:31:23 +0000 (01:31 +0000)
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

index 69fafc35a22acd7303affaf388af2bd76860e6df..fb0aebb445f6370ad2a14496e5bb4993736ed38a 100644 (file)
@@ -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;
 }