]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Frank Schmirler <squid@schmirler.de>
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 30 Jan 2010 00:30:56 +0000 (13:30 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 30 Jan 2010 00:30:56 +0000 (13:30 +1300)
Bug 2851: Connection pinning fails when using a peer

src/client_side.h
src/peer_select.cc

index 412948069d511d2e39cece7b471d6504d63c895f..3c1cf8362ff0c540faa057ce7181fc3a864a0c85 100644 (file)
@@ -250,7 +250,7 @@ public:
      \param peer      if it is not NULL also check if the peer is the pinning peer
      \return          The fd of the server side connection or -1 if fails.
      */
-    int validatePinnedConnection(HttpRequest *request, const struct peer *peer=NULL);
+    int validatePinnedConnection(HttpRequest *request, const struct peer *peer);
     /**
      * returts the pinned peer if exists, NULL otherwise
      */
index b7ebe8f65b27ca8b4f117191df4ed26d888a6aee..4cdc429f58ef15fe6ef3a98e8bce4187277dfcb5 100644 (file)
@@ -360,8 +360,8 @@ peerSelectPinned(ps_state * ps)
     peer *peer;
     if (!request->pinnedConnection())
         return;
-    if (request->pinnedConnection()->validatePinnedConnection(request) != -1) {
-        peer = request->pinnedConnection()->pinnedPeer();
+    peer = request->pinnedConnection()->pinnedPeer();
+    if (request->pinnedConnection()->validatePinnedConnection(request, peer) != -1) {
         if (peer && peerAllowedToUse(peer, request)) {
             peerAddFwdServer(&ps->servers, peer, PINNED);
             if (ps->entry)