--------------------- PatchSet 3161 Date: 2006/05/28 17:20:52 Author: serassio Branch: nt Tag: (none) Log: Ran astyle Members: src/comm_select_win32.cc:1.1.2.1->1.1.2.2 Index: squid3/src/comm_select_win32.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/comm_select_win32.cc,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- squid3/src/comm_select_win32.cc 28 May 2006 17:17:46 -0000 1.1.2.1 +++ squid3/src/comm_select_win32.cc 28 May 2006 17:20:52 -0000 1.1.2.2 @@ -1,6 +1,6 @@ /* - * $Id: comm_select_win32.cc,v 1.1.2.1 2006/05/28 17:17:46 serassio Exp $ + * $Id: comm_select_win32.cc,v 1.1.2.2 2006/05/28 17:20:52 serassio Exp $ * * DEBUG: section 5 Socket Functions * @@ -533,6 +533,7 @@ for ( fd = Biggest_FD; fd; fd-- ) { osfhandle = fd_table[fd].win32.handle; + if (( osfhandle == readfds_handle ) || ( osfhandle == pendingfds_handle )) { if (fd_table[fd].flags.open) { @@ -547,61 +548,62 @@ #if DEBUG_FDBITS - debug(5, 9) ("FD %d bit set for reading\n", fd); + debug(5, 9) ("FD %d bit set for reading\n", fd); - assert(FD_ISSET(fd, &readfds)); + assert(FD_ISSET(fd, &readfds)); #endif - if (fdIsIcp(fd)) { - callicp = 1; - continue; - } + if (fdIsIcp(fd)) { + callicp = 1; + continue; + } - if (fdIsDns(fd)) { - calldns = 1; - continue; - } + if (fdIsDns(fd)) { + calldns = 1; + continue; + } - if (fdIsHttp(fd)) { - callhttp = 1; - continue; - } + if (fdIsHttp(fd)) { + callhttp = 1; + continue; + } - F = &fd_table[fd]; - debug(5, 6) ("comm_select: FD %d ready for reading\n", fd); + F = &fd_table[fd]; + debug(5, 6) ("comm_select: FD %d ready for reading\n", fd); - if (NULL == (hdl = F->read_handler)) - (void) 0; + if (NULL == (hdl = F->read_handler)) + (void) 0; #if DELAY_POOLS - else if (FD_ISSET(fd, &slowfds)) - commAddSlowFd(fd); + else if (FD_ISSET(fd, &slowfds)) + commAddSlowFd(fd); #endif - else { - F->read_handler = NULL; - commUpdateReadBits(fd, NULL); - hdl(fd, F->read_data); - statCounter.select_fds++; + else { + F->read_handler = NULL; + commUpdateReadBits(fd, NULL); + hdl(fd, F->read_data); + statCounter.select_fds++; - if (commCheckICPIncoming) - comm_select_icp_incoming(); + if (commCheckICPIncoming) + comm_select_icp_incoming(); - if (commCheckDNSIncoming) - comm_select_dns_incoming(); + if (commCheckDNSIncoming) + comm_select_dns_incoming(); - if (commCheckHTTPIncoming) - comm_select_http_incoming(); - } + if (commCheckHTTPIncoming) + comm_select_http_incoming(); } + } assert(errfds.fd_count <= (unsigned int) Biggest_FD); for (j = 0; j < (int) errfds.fd_count; j++) { register int errfds_handle = errfds.fd_array[j]; + for ( fd = Biggest_FD; fd; fd-- ) { if ( fd_table[fd].win32.handle == errfds_handle ) break; @@ -639,44 +641,44 @@ #if DEBUG_FDBITS - debug(5, 9) ("FD %d bit set for writing\n", fd); + debug(5, 9) ("FD %d bit set for writing\n", fd); - assert(FD_ISSET(fd, &writefds)); + assert(FD_ISSET(fd, &writefds)); #endif - if (fdIsIcp(fd)) { - callicp = 1; - continue; - } + if (fdIsIcp(fd)) { + callicp = 1; + continue; + } - if (fdIsDns(fd)) { - calldns = 1; - continue; - } + if (fdIsDns(fd)) { + calldns = 1; + continue; + } - if (fdIsHttp(fd)) { - callhttp = 1; - continue; - } + if (fdIsHttp(fd)) { + callhttp = 1; + continue; + } - F = &fd_table[fd]; - debug(5, 5) ("comm_select: FD %d ready for writing\n", fd); + F = &fd_table[fd]; + debug(5, 5) ("comm_select: FD %d ready for writing\n", fd); - if ((hdl = F->write_handler)) { - F->write_handler = NULL; - commUpdateWriteBits(fd, NULL); - hdl(fd, F->write_data); - statCounter.select_fds++; + if ((hdl = F->write_handler)) { + F->write_handler = NULL; + commUpdateWriteBits(fd, NULL); + hdl(fd, F->write_data); + statCounter.select_fds++; - if (commCheckICPIncoming) - comm_select_icp_incoming(); + if (commCheckICPIncoming) + comm_select_icp_incoming(); - if (commCheckDNSIncoming) - comm_select_dns_incoming(); + if (commCheckDNSIncoming) + comm_select_dns_incoming(); - if (commCheckHTTPIncoming) - comm_select_http_incoming(); + if (commCheckHTTPIncoming) + comm_select_http_incoming(); }