]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/peer_sourcehash.cc
Renamed squid.h to squid-old.h and config.h to squid.h
[thirdparty/squid.git] / src / peer_sourcehash.cc
index 6dd8073d8bcdcde00f83ea09fc377f3696730681..cb4b8752a1612808bf38ab04dd6fdf39d7c9a6cf 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: carp.cc,v 1.27 2008/01/14 12:13:49 hno Exp $
+ * $Id$
  *
  * DEBUG: section 39    Peer source hash based selection
  * AUTHOR: Henrik Nordstrom
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
  *
  */
 
-#include "squid.h"
-#include "CacheManager.h"
+#include "squid-old.h"
 #include "Store.h"
 #include "HttpRequest.h"
+#include "mgr/Registration.h"
 
 #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
 
@@ -157,9 +157,8 @@ peerSourceHashInit(void)
 static void
 peerSourceHashRegisterWithCacheManager(void)
 {
-    CacheManager::GetInstance()->
-        registerAction("sourcehash", "peer sourcehash information", 
-                      peerSourceHashCachemgr, 0, 1);
+    Mgr::RegisterAction("sourcehash", "peer sourcehash information",
+                        peerSourceHashCachemgr, 0, 1);
 }
 
 peer *
@@ -194,7 +193,7 @@ peerSourceHashSelectParent(HttpRequest * request)
         combined_hash += combined_hash * 0x62531965;
         combined_hash = ROTATE_LEFT(combined_hash, 21);
         score = combined_hash * tp->sourcehash.load_multiplier;
-        debugs(39, 3, "peerSourceHashSelectParent: " << tp->name << " combined_hash " << combined_hash  << 
+        debugs(39, 3, "peerSourceHashSelectParent: " << tp->name << " combined_hash " << combined_hash  <<
                " score " << std::setprecision(0) << score);
 
         if ((score > high_score) && peerHTTPOkay(tp, request)) {