Changeset 16529 in vbox for trunk/src/VBox/Devices/Network/slirp/tcp_subr.c
- Timestamp:
- Feb 5, 2009 3:35:30 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/tcp_subr.c
r16449 r16529 450 450 socklen_t addrlen = sizeof(struct sockaddr_in); 451 451 struct tcpcb *tp; 452 int s, opt ;452 int s, opt, optlen, status; 453 453 454 454 DEBUG_CALL("tcp_connect"); … … 496 496 setsockopt(s,IPPROTO_TCP,TCP_NODELAY,(char *)&opt,sizeof(int)); 497 497 498 optlen = sizeof(int); 499 status = getsockopt(s, SOL_SOCKET, SO_RCVBUF, &opt, &optlen); 500 if (status < 0) 501 { 502 LogRel(("Error(%d) while getting RCV capacity\n", errno)); 503 goto no_sockopt; 504 } 505 opt *= 4; 506 status = setsockopt(s, SOL_SOCKET, SO_RCVBUF, &opt, optlen); 507 if (status < 0) 508 { 509 LogRel(("Error(%d) while setting RCV capacity to (%d)\n", errno, opt)); 510 goto no_sockopt; 511 } 512 status = getsockopt(s, SOL_SOCKET, SO_SNDBUF, &opt, &optlen); 513 if (status < 0) 514 { 515 LogRel(("Error(%d) while getting SND capacity\n", errno)); 516 goto no_sockopt; 517 } 518 opt *= 4; 519 status = setsockopt(s, SOL_SOCKET, SO_SNDBUF, &opt, optlen); 520 if (status < 0) 521 { 522 LogRel(("Error(%d) while setting SND capacity to (%d)\n", errno, opt)); 523 goto no_sockopt; 524 } 525 526 no_sockopt: 498 527 so->so_fport = addr.sin_port; 499 528 so->so_faddr = addr.sin_addr;
Note:
See TracChangeset
for help on using the changeset viewer.