From: Amos Jeffries Date: Sat, 30 Jan 2010 01:21:52 +0000 (+1300) Subject: Author: Frank Schmirler X-Git-Tag: SQUID_3_1_0_16~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=325245055677eb96943d0398451662cdc054ad76;p=thirdparty%2Fsquid.git Author: Frank Schmirler Bug 2851: Connection pinning fails when using a peer --- diff --git a/src/client_side.h b/src/client_side.h index 1a62846f16..2c8ef911b7 100644 --- a/src/client_side.h +++ b/src/client_side.h @@ -239,7 +239,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 */ diff --git a/src/peer_select.cc b/src/peer_select.cc index 7caf9c5ec5..7235853b51 100644 --- a/src/peer_select.cc +++ b/src/peer_select.cc @@ -385,8 +385,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)