From: Alex Rousskov Date: Thu, 8 May 2008 20:15:25 +0000 (-0600) Subject: Implement broken() so that kids do not have to. X-Git-Tag: SQUID_3_1_0_1~45^2~11^2~26^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=201438aca2e0a264720d7446156409f3ba5ee050;p=thirdparty%2Fsquid.git Implement broken() so that kids do not have to. --- diff --git a/src/adaptation/Service.cc b/src/adaptation/Service.cc index 8d3f6ebef0..6f35d33e25 100644 --- a/src/adaptation/Service.cc +++ b/src/adaptation/Service.cc @@ -18,6 +18,11 @@ Adaptation::Service::finalize() { } +bool Adaptation::Service::broken() const +{ + return probed() && !up(); +} + Adaptation::Services & Adaptation::AllServices() { diff --git a/src/adaptation/Service.h b/src/adaptation/Service.h index 9d6303ed38..15806dd3ea 100644 --- a/src/adaptation/Service.h +++ b/src/adaptation/Service.h @@ -30,7 +30,7 @@ public: virtual void invalidate() = 0; virtual bool probed() const = 0; // see comments above - virtual bool broken() const = 0; // see comments above + virtual bool broken() const; virtual bool up() const = 0; // see comments above virtual Initiate *makeXactLauncher(Initiator *, HttpMsg *virginHeader, HttpRequest *virginCause) = 0;