Changeset 63277 in vbox for trunk/src/VBox/NetworkServices
- Timestamp:
- Aug 10, 2016 2:31:08 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 109910
- Location:
- trunk/src/VBox/NetworkServices/NAT
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/NetworkServices/NAT/pxdns.c
r62481 r63277 313 313 314 314 if (g_proxy_options->nameservers != NULL) { 315 RTMemFree( g_proxy_options->nameservers);315 RTMemFree((void *)g_proxy_options->nameservers); 316 316 } 317 317 g_proxy_options->nameservers = nameservers; … … 703 703 union sockaddr_inet *resolver; 704 704 ssize_t nsent; 705 #ifdef RT_OS_WINDOWS 706 const char *pSendData = (const char *)&req->data[0]; 707 int cbSendData = (int)req->size; 708 Assert((size_t)cbSendData == req->size); 709 #else 710 const void *pSendData = &req->data[0]; 711 size_t cbSendData = req->size; 712 #endif 705 713 706 714 DPRINTF2(("%s: req %p: sending to resolver #%lu\n", … … 712 720 713 721 if (resolver->sa.sa_family == AF_INET) { 714 nsent = sendto(pxdns->sock4, req->data, req->size, 0,722 nsent = sendto(pxdns->sock4, pSendData, cbSendData, 0, 715 723 &resolver->sa, sizeof(resolver->sin)); 716 724 … … 718 726 else if (resolver->sa.sa_family == AF_INET6) { 719 727 if (pxdns->sock6 != INVALID_SOCKET) { 720 nsent = sendto(pxdns->sock6, req->data, req->size, 0,728 nsent = sendto(pxdns->sock6, pSendData, cbSendData, 0, 721 729 &resolver->sa, sizeof(resolver->sin6)); 722 730 } … … 816 824 817 825 826 #ifdef RT_OS_WINDOWS 827 nread = recv(fd, (char *)pollmgr_udpbuf, sizeof(pollmgr_udpbuf), 0); 828 #else 818 829 nread = recv(fd, pollmgr_udpbuf, sizeof(pollmgr_udpbuf), 0); 830 #endif 819 831 if (nread < 0) { 820 832 DPRINTF(("%s: %R[sockerr]\n", __func__, SOCKERRNO())); -
trunk/src/VBox/NetworkServices/NAT/pxtcp.c
r62481 r63277 1116 1116 { 1117 1117 struct pxtcp *pxtcp; 1118 RT_NOREF(fd); 1118 1119 1119 1120 pxtcp = (struct pxtcp *)handler->data; … … 1690 1691 int status; 1691 1692 int sockerr; 1693 RT_NOREF(fd); 1692 1694 1693 1695 pxtcp = (struct pxtcp *)handler->data; … … 2144 2146 } 2145 2147 2146 error = tcp_write(pcb, &pxtcp->inbuf.buf[beg], toeob, maybemore); 2148 Assert(toeob == (u16)toeob); 2149 error = tcp_write(pcb, &pxtcp->inbuf.buf[beg], (u16_t)toeob, maybemore); 2147 2150 if (error != ERR_OK) { 2148 2151 goto writeerr; -
trunk/src/VBox/NetworkServices/NAT/pxudp.c
r62481 r63277 599 599 * valid for SOCK_RAW. 600 600 */ 601 # define USE_DF_OPTION(_Optname) \ 602 const int dfopt = _Optname; \ 603 const char * const dfoptname = #_Optname; 601 # define USE_DF_OPTION(_Optname) \ 602 const int dfopt = _Optname; \ 603 const char * const dfoptname = #_Optname; \ 604 RT_NOREF_PV(dfoptname) 604 605 #if defined(IP_MTU_DISCOVER) /* Linux */ 605 606 USE_DF_OPTION(IP_MTU_DISCOVER); … … 759 760 } 760 761 762 #ifdef RT_OS_WINDOWS 763 nread = recv(pxudp->sock, (char *)pollmgr_udpbuf, sizeof(pollmgr_udpbuf), 0); 764 #else 761 765 nread = recv(pxudp->sock, pollmgr_udpbuf, sizeof(pollmgr_udpbuf), 0); 766 #endif 762 767 if (nread == SOCKET_ERROR) { 763 768 DPRINTF(("%s: %R[sockerr]\n", __func__, SOCKERRNO()));
Note:
See TracChangeset
for help on using the changeset viewer.