From: Amos Jeffries Date: Sat, 30 Jan 2010 00:30:56 +0000 (+1300) Subject: Author: Frank Schmirler X-Git-Tag: SQUID_3_2_0_1~443 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ceb53c83d83bbbb8b016daba7617d6e3ef8bf230;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 412948069d..3c1cf8362f 100644 --- a/src/client_side.h +++ b/src/client_side.h @@ -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 */ diff --git a/src/peer_select.cc b/src/peer_select.cc index b7ebe8f65b..4cdc429f58 100644 --- a/src/peer_select.cc +++ b/src/peer_select.cc @@ -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)