Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Side by Side Diff: webrtc/base/physicalsocketserver.cc

Issue 2452373002: Testing if 2442743002 is causing problems. (Closed)
Patch Set: Rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/base/base.gyp ('k') | webrtc/build/whitespace.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 #include "webrtc/base/physicalsocketserver.h" 10 #include "webrtc/base/physicalsocketserver.h"
(...skipping 1562 matching lines...) Expand 10 before | Expand all | Expand 10 after
1573 iterators_.push_back(&end); // Don't iterate over new dispatchers. 1573 iterators_.push_back(&end); // Don't iterate over new dispatchers.
1574 while (i < end) { 1574 while (i < end) {
1575 Dispatcher* disp = dispatchers_[i++]; 1575 Dispatcher* disp = dispatchers_[i++];
1576 SOCKET s = disp->GetSocket(); 1576 SOCKET s = disp->GetSocket();
1577 if (s == INVALID_SOCKET) 1577 if (s == INVALID_SOCKET)
1578 continue; 1578 continue;
1579 1579
1580 WSANETWORKEVENTS wsaEvents; 1580 WSANETWORKEVENTS wsaEvents;
1581 int err = WSAEnumNetworkEvents(s, events[0], &wsaEvents); 1581 int err = WSAEnumNetworkEvents(s, events[0], &wsaEvents);
1582 if (err == 0) { 1582 if (err == 0) {
1583
1584 #if LOGGING
1583 { 1585 {
1584 if ((wsaEvents.lNetworkEvents & FD_READ) && 1586 if ((wsaEvents.lNetworkEvents & FD_READ) &&
1585 wsaEvents.iErrorCode[FD_READ_BIT] != 0) { 1587 wsaEvents.iErrorCode[FD_READ_BIT] != 0) {
1586 LOG(WARNING) << "PhysicalSocketServer got FD_READ_BIT error " 1588 LOG(WARNING) << "PhysicalSocketServer got FD_READ_BIT error "
1587 << wsaEvents.iErrorCode[FD_READ_BIT]; 1589 << wsaEvents.iErrorCode[FD_READ_BIT];
1588 } 1590 }
1589 if ((wsaEvents.lNetworkEvents & FD_WRITE) && 1591 if ((wsaEvents.lNetworkEvents & FD_WRITE) &&
1590 wsaEvents.iErrorCode[FD_WRITE_BIT] != 0) { 1592 wsaEvents.iErrorCode[FD_WRITE_BIT] != 0) {
1591 LOG(WARNING) << "PhysicalSocketServer got FD_WRITE_BIT error " 1593 LOG(WARNING) << "PhysicalSocketServer got FD_WRITE_BIT error "
1592 << wsaEvents.iErrorCode[FD_WRITE_BIT]; 1594 << wsaEvents.iErrorCode[FD_WRITE_BIT];
1593 } 1595 }
1594 if ((wsaEvents.lNetworkEvents & FD_CONNECT) && 1596 if ((wsaEvents.lNetworkEvents & FD_CONNECT) &&
1595 wsaEvents.iErrorCode[FD_CONNECT_BIT] != 0) { 1597 wsaEvents.iErrorCode[FD_CONNECT_BIT] != 0) {
1596 LOG(WARNING) << "PhysicalSocketServer got FD_CONNECT_BIT error " 1598 LOG(WARNING) << "PhysicalSocketServer got FD_CONNECT_BIT error "
1597 << wsaEvents.iErrorCode[FD_CONNECT_BIT]; 1599 << wsaEvents.iErrorCode[FD_CONNECT_BIT];
1598 } 1600 }
1599 if ((wsaEvents.lNetworkEvents & FD_ACCEPT) && 1601 if ((wsaEvents.lNetworkEvents & FD_ACCEPT) &&
1600 wsaEvents.iErrorCode[FD_ACCEPT_BIT] != 0) { 1602 wsaEvents.iErrorCode[FD_ACCEPT_BIT] != 0) {
1601 LOG(WARNING) << "PhysicalSocketServer got FD_ACCEPT_BIT error " 1603 LOG(WARNING) << "PhysicalSocketServer got FD_ACCEPT_BIT error "
1602 << wsaEvents.iErrorCode[FD_ACCEPT_BIT]; 1604 << wsaEvents.iErrorCode[FD_ACCEPT_BIT];
1603 } 1605 }
1604 if ((wsaEvents.lNetworkEvents & FD_CLOSE) && 1606 if ((wsaEvents.lNetworkEvents & FD_CLOSE) &&
1605 wsaEvents.iErrorCode[FD_CLOSE_BIT] != 0) { 1607 wsaEvents.iErrorCode[FD_CLOSE_BIT] != 0) {
1606 LOG(WARNING) << "PhysicalSocketServer got FD_CLOSE_BIT error " 1608 LOG(WARNING) << "PhysicalSocketServer got FD_CLOSE_BIT error "
1607 << wsaEvents.iErrorCode[FD_CLOSE_BIT]; 1609 << wsaEvents.iErrorCode[FD_CLOSE_BIT];
1608 } 1610 }
1609 } 1611 }
1612 #endif
1610 uint32_t ff = 0; 1613 uint32_t ff = 0;
1611 int errcode = 0; 1614 int errcode = 0;
1612 if (wsaEvents.lNetworkEvents & FD_READ) 1615 if (wsaEvents.lNetworkEvents & FD_READ)
1613 ff |= DE_READ; 1616 ff |= DE_READ;
1614 if (wsaEvents.lNetworkEvents & FD_WRITE) 1617 if (wsaEvents.lNetworkEvents & FD_WRITE)
1615 ff |= DE_WRITE; 1618 ff |= DE_WRITE;
1616 if (wsaEvents.lNetworkEvents & FD_CONNECT) { 1619 if (wsaEvents.lNetworkEvents & FD_CONNECT) {
1617 if (wsaEvents.iErrorCode[FD_CONNECT_BIT] == 0) { 1620 if (wsaEvents.iErrorCode[FD_CONNECT_BIT] == 0) {
1618 ff |= DE_CONNECT; 1621 ff |= DE_CONNECT;
1619 } else { 1622 } else {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1651 break; 1654 break;
1652 } 1655 }
1653 } 1656 }
1654 1657
1655 // Done 1658 // Done
1656 return true; 1659 return true;
1657 } 1660 }
1658 #endif // WEBRTC_WIN 1661 #endif // WEBRTC_WIN
1659 1662
1660 } // namespace rtc 1663 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/base.gyp ('k') | webrtc/build/whitespace.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698