VirtualBox

Changeset 49860 in vbox for trunk/src


Ignore:
Timestamp:
Dec 10, 2013 4:50:47 AM (11 years ago)
Author:
vboxsync
Message:

proxy_sendto: return negated error code.

Location:
trunk/src/VBox/NetworkServices/NAT
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/NetworkServices/NAT/proxy.c

    r49713 r49860  
    400400
    401401
    402 void
     402int
    403403proxy_sendto(SOCKET sock, struct pbuf *p, void *name, size_t namelen)
    404404{
     
    416416    IOVEC *dyniov;       /* dynamically sized */
    417417    IOVEC *iov;
     418    int error = 0;
    418419
    419420    /*
     
    428429        dyniov = (IOVEC *)malloc(clen * sizeof(*dyniov));
    429430        if (dyniov == NULL) {
     431            error = -errno;
    430432            goto out;
    431433        }
     
    454456    nsent = sendmsg(sock, &mh, 0);
    455457    if (nsent < 0) {
     458        error = -errno;
    456459        DPRINTF(("%s: fd %d: sendmsg errno %d\n",
    457460                 __func__, sock, errno));
     
    463466         DPRINTF(("%s: fd %d: sendmsg errno %d\n",
    464467                  __func__, sock, WSAGetLastError()));
     468         error = -WSAGetLastError();
    465469    }
    466470#endif
     
    471475    }
    472476    pbuf_free(p);
     477    return error;
    473478}
    474479
  • trunk/src/VBox/NetworkServices/NAT/proxy.h

    r49605 r49860  
    4949SOCKET proxy_bound_socket(int, int, struct sockaddr *);
    5050void proxy_reset_socket(SOCKET);
    51 void proxy_sendto(SOCKET, struct pbuf *, void *, size_t);
     51int proxy_sendto(SOCKET, struct pbuf *, void *, size_t);
    5252void proxy_lwip_post(struct tcpip_msg *);
    5353const char *proxy_lwip_strerr(err_t);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette