- Timestamp:
- Feb 16, 2009 1:34:24 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/slirp.c
r16768 r16788 1132 1132 */ 1133 1133 #endif 1134 1135 1134 if ( so->so_state & SS_ISFCONNECTING 1136 1135 || UNIX_CHECK_FD_SET(so, NetworkEvents, readfds)) … … 1144 1143 /* 1145 1144 * Never meet inq != 0 or outq != 0, anyway let it stay for a while 1146 * in case it happens we'll able to detect it. 1145 * in case it happens we'll able to detect it. 1146 * Give TCP/IP stack wait or expire the socket. 1147 1147 */ 1148 1148 LogRel(("NAT:%R[natsock] err(%d:%s) s(in:%d,out:%d)happens on read I/O, " 1149 1149 "other side close connection \n", so, err, strerror(err), inq, outq)); 1150 CONTINUE(tcp); 1150 1151 } 1151 so->so_state = SS_NOFDREF; 1152 TCP_INPUT(pData, (struct mbuf *)NULL, sizeof(struct ip), so); 1153 CONTINUE(tcp); 1152 goto tcp_input_close; 1153 } 1154 if ( !UNIX_CHECK_FD_SET(so, NetworkEvents, readfds) 1155 && !UNIX_CHECK_FD_SET(so, NetworkEvents, writefds) 1156 && !UNIX_CHECK_FD_SET(so, NetworkEvents, xfds)) 1157 { 1158 LogRel(("NAT:system expires the socket %R[natsock] err(%d:%s) s(in:%d,out:%d) happens on non-I/O. " 1159 so, err, strerror(err), inq, outq)); 1160 goto tcp_input_close; 1154 1161 } 1155 1162 LogRel(("NAT:%R[natsock] we've met(%d:%s) s(in:%d, out:%d) unhandled combination hup (%d) " … … 1163 1170 UNIX_CHECK_FD_SET(so, ign, xfds))); 1164 1171 /* 1165 * Here should be other error handlings 1166 * The error handling code above handles the errors can happens on reading 1167 * we haven't still met any cases of error on write. 1172 * Give OS's TCP/IP stack a chance to resolve an issue or expire the socket. 1168 1173 */ 1169 AssertRelease(!"shouldn't be here!!!"); 1174 CONTINUE(tcp); 1175 tcp_input_close: 1176 so->so_state = SS_NOFDREF; /*cause connection valid tcp connection termination and socket closing */ 1177 TCP_INPUT(pData, (struct mbuf *)NULL, sizeof(struct ip), so); 1178 CONTINUE(tcp); 1170 1179 } 1171 1180 #endif
Note:
See TracChangeset
for help on using the changeset viewer.