Changeset 41855 in vbox for trunk/src/VBox
- Timestamp:
- Jun 21, 2012 5:46:27 AM (12 years ago)
- Location:
- trunk/src/VBox/Devices/Network/slirp
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/libalias/alias_db.c
r41839 r41855 822 822 ret = connect(so->s, (struct sockaddr *)&sin, sizeof(sin)); 823 823 if ( ret < 0 824 && errno == EINPROGRESS 825 && errno == EAGAIN 826 && errno == EWOULDBLOCK) 824 && !soIgnorableErrorCode(errno)) 827 825 { 828 826 closesocket(so->s); -
trunk/src/VBox/Devices/Network/slirp/slirp.c
r41812 r41855 1114 1114 { 1115 1115 /* XXXXX Must fix, zero bytes is a NOP */ 1116 if ( errno == EAGAIN 1117 || errno == EWOULDBLOCK 1118 || errno == EINPROGRESS 1116 if ( soIgnorableErrorCode(errno) 1119 1117 || errno == ENOTCONN) 1120 1118 { … … 1384 1382 { 1385 1383 /* XXX */ 1386 if ( errno == EAGAIN 1387 || errno == EWOULDBLOCK 1388 || errno == EINPROGRESS 1384 if ( soIgnorableErrorCode(errno) 1389 1385 || errno == ENOTCONN) 1390 1386 { … … 1403 1399 { 1404 1400 /* XXX */ 1405 if ( errno == EAGAIN 1406 || errno == EWOULDBLOCK 1407 || errno == EINPROGRESS 1401 if ( soIgnorableErrorCode(errno) 1408 1402 || errno == ENOTCONN) 1409 1403 { -
trunk/src/VBox/Devices/Network/slirp/socket.c
r41806 r41855 335 335 } 336 336 if ( nn < 0 337 && ( errno == EINTR 338 || errno == EAGAIN 339 || errno == EWOULDBLOCK)) 337 && soIgnorableErrorCode(errno)) 340 338 { 341 339 SOCKET_UNLOCK(so); … … 468 466 } 469 467 if ( n < 0 470 && ( errno == EINTR 471 || errno == EAGAIN 472 || errno == EWOULDBLOCK)) 468 && soIgnorableErrorCode(errno)) 473 469 { 474 470 SOCKET_UNLOCK(so); … … 687 683 /* This should never happen, but people tell me it does *shrug* */ 688 684 if ( nn < 0 689 && ( errno == EAGAIN 690 || errno == EINTR 691 || errno == EWOULDBLOCK)) 685 && soIgnorableErrorCode(errno)) 692 686 { 693 687 SOCKET_UNLOCK(so); … … 845 839 if (rc == -1) 846 840 { 847 if ( errno == EAGAIN 848 || errno == EWOULDBLOCK 849 || errno == EINPROGRESS 841 if ( soIgnorableErrorCode(errno) 850 842 || errno == ENOTCONN) 851 843 return; … … 917 909 918 910 m_freem(pData, m); 919 if ( errno == EAGAIN 920 || errno == EWOULDBLOCK 921 || errno == EINPROGRESS 911 if ( soIgnorableErrorCode(errno) 922 912 || errno == ENOTCONN) 923 913 { … … 1627 1617 (struct sockaddr *)&addr, &addrlen); 1628 1618 if ( len < 0 1629 && ( errno == EAGAIN 1630 || errno == EWOULDBLOCK 1631 || errno == EINPROGRESS 1619 && ( soIgnorableErrorCode(errno) 1632 1620 || errno == ENOTCONN)) 1633 1621 { … … 1686 1674 (struct sockaddr *)&addr, &addrlen); 1687 1675 if ( len < 0 1688 && ( errno == EAGAIN 1689 || errno == EWOULDBLOCK 1690 || errno == EINPROGRESS 1676 && ( soIgnorableErrorCode(errno) 1691 1677 || errno == ENOTCONN)) 1692 1678 { -
trunk/src/VBox/Devices/Network/slirp/socket.h
r41453 r41855 195 195 #endif 196 196 197 static inline int soIgnorableErrorCode(int iErrorCode) 198 { 199 return ( iErrorCode == EINPROGRESS 200 || iErrorCode == EAGAIN 201 || iErrorCode == EWOULDBLOCK); 202 } 203 197 204 #endif /* _SOCKET_H_ */ -
trunk/src/VBox/Devices/Network/slirp/tcp_timer.h
r41840 r41855 152 152 void tcp_slowtimo (PNATState); 153 153 void tcp_canceltimers (struct tcpcb *); 154 #if 0155 struct tcpcb * tcp_timers (PNATState, register struct tcpcb *, int);156 154 #endif 157 158 #endif -
trunk/src/VBox/Devices/Network/slirp/udp.c
r41817 r41855 295 295 296 296 if ( sosendto(pData, so, m) == -1 297 && ( errno != EAGAIN 298 && errno != EWOULDBLOCK 299 && errno != EINPROGRESS 297 && ( soIgnorableErrorCode(errno) 300 298 && errno != ENOTCONN)) 301 299 { … … 306 304 errno, strerror(errno), ip->ip_dst)); 307 305 #if 0 308 /* ICMP_SOURCEQUENCH haven't got any effect, the idea here 309 * inform guest about the exosting NAT resources with assumption that 310 * that guest reduce traffic. But it doesn't work 306 /* ICMP_SOURCEQUENCH haven't got any effect, the idea here 307 * inform guest about the exosting NAT resources with assumption that 308 * that guest reduce traffic. But it doesn't work 311 309 */ 312 310 if( errno == EAGAIN
Note:
See TracChangeset
for help on using the changeset viewer.