Changeset 20974 in vbox for trunk/src/VBox/Devices/Network/slirp/libalias/alias_db.c
- Timestamp:
- Jun 26, 2009 1:52:10 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/libalias/alias_db.c
r20958 r20974 332 332 int expire_time; /* Expire time for link */ 333 333 #ifndef NO_USE_SOCKETS 334 # ifndef VBOX 335 /* 336 * in VBox we do not use host's sockets here, which are managed 337 * inside slirp. yes we have to create new sockets here but latter 338 * managment and deletion are in repsponsible of Slirp. 339 */ 334 340 int sockfd; /* socket descriptor */ 341 # endif 335 342 #endif 336 343 LIST_ENTRY (alias_link) list_out; /* Linked list of … … 671 678 && ((lnk->link_type == LINK_TCP) || 672 679 (lnk->link_type == LINK_UDP))) { 680 #ifndef VBOX 673 681 if (GetSocket(la, port_net, &lnk->sockfd, lnk->link_type)) { 682 #else 683 if (GetSocket(la, port_net, NULL, lnk->link_type)) { 684 #endif 674 685 lnk->alias_port = port_net; 675 686 return (0); … … 754 765 if (err == 0) { 755 766 la->sockCount++; 756 *sockfd = sock;757 767 #ifdef VBOX 758 768 so->so_expire = la->curtime + SO_EXPIRE; … … 782 792 } 783 793 794 #else 795 *sockfd = sock; 784 796 #endif 785 797 return (1); … … 954 966 #ifndef NO_USE_SOCKETS 955 967 /* Close socket, if one has been allocated */ 968 # ifndef VBOX 956 969 if (lnk->sockfd != -1) { 957 970 la->sockCount--; 958 971 close(lnk->sockfd); 959 972 } 973 # else 974 /* Slirp will close the socket in its own way */ 975 # endif 960 976 #endif 961 977 /* Link-type dependent cleanup */ … … 1027 1043 lnk->link_type = link_type; 1028 1044 #ifndef NO_USE_SOCKETS 1045 # ifndef VBOX 1029 1046 lnk->sockfd = -1; 1047 # endif 1030 1048 #endif 1031 1049 lnk->flags = 0;
Note:
See TracChangeset
for help on using the changeset viewer.