From: Amos Jeffries Date: Fri, 16 Mar 2012 00:54:17 +0000 (-0600) Subject: Windows: use Comm::Connection ICP sockets X-Git-Tag: SQUID_3_2_0_17~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8a850bade1cd46e2270342b0ecf2bdf592df2c7;p=thirdparty%2Fsquid.git Windows: use Comm::Connection ICP sockets --- diff --git a/src/comm/ModSelect.cc b/src/comm/ModSelect.cc index c882569be7..0de9dce3ad 100644 --- a/src/comm/ModSelect.cc +++ b/src/comm/ModSelect.cc @@ -37,13 +37,13 @@ #include "squid-old.h" #include "comm/Connection.h" #include "comm/Loops.h" +#include "fde.h" #include "ICP.h" #include "mgr/Registration.h" #include "SquidTime.h" #include "StatCounters.h" #include "StatHist.h" #include "Store.h" -#include "fde.h" static int MAX_POLL_TIME = 1000; /* see also Comm::QuickPollRequired() */ diff --git a/src/comm/ModSelectWin32.cc b/src/comm/ModSelectWin32.cc index 92716bd8f2..da3ea49fa9 100644 --- a/src/comm/ModSelectWin32.cc +++ b/src/comm/ModSelectWin32.cc @@ -30,14 +30,15 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. * */ - #include "squid.h" #if USE_SELECT_WIN32 #include "squid-old.h" +#include "comm/Connection.h" #include "comm/Loops.h" #include "fde.h" +#include "ICP.h" #include "mgr/Registration.h" #include "SquidTime.h" #include "StatCounters.h" @@ -168,10 +169,10 @@ Comm::ResetSelect(int fd) static int fdIsIcp(int fd) { - if (fd == theInIcpConnection) + if (icpIncomingConn != NULL && fd == icpIncomingConn->fd) return 1; - if (fd == theOutIcpConnection) + if (icpOutgoingConn != NULL && fd == icpOutgoingConn->fd) return 1; return 0; @@ -281,12 +282,11 @@ comm_select_icp_incoming(void) int nevents; icp_io_events = 0; - if (theInIcpConnection >= 0) - fds[nfds++] = theInIcpConnection; + if (Comm::IsConnOpen(icpIncomingConn)) + fds[nfds++] = icpIncomingConn->fd; - if (theInIcpConnection != theOutIcpConnection) - if (theOutIcpConnection >= 0) - fds[nfds++] = theOutIcpConnection; + if (Comm::IsConnOpen(icpOutgoingConn) && icpIncomingConn != icpOutgoingConn) + fds[nfds++] = icpOutgoingConn->fd; if (nfds == 0) return;