VirtualBox

Changeset 33145 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Oct 15, 2010 2:07:29 AM (14 years ago)
Author:
vboxsync
Message:

NAT: releasing of temporal buffer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/socket.c

    r32839 r33145  
    738738        */
    739739        rc = ioctlsocket(so->s, FIONREAD, &n);
    740         if (rc == -1 && signalled == 0)
    741         {
    742             LogRel(("NAT: can't fetch amount of bytes on socket %R[natsock], so message will be truncated.\n", so));
    743             signalled = 1;
     740        if (rc == -1)
     741        {
     742            if (  errno == EAGAIN
     743               || errno == EWOULDBLOCK
     744               || errno == EINPROGRESS
     745               || errno == ENOTCONN)
     746                return;
     747            else if (signalled == 0)
     748            {
     749                LogRel(("NAT: can't fetch amount of bytes on socket %R[natsock], so message will be truncated.\n", so));
     750                signalled = 1;
     751            }
     752            return;
    744753        }
    745754
     
    910919    ret = sendto(so->s, buf, mlen, 0,
    911920                 (struct sockaddr *)&addr, sizeof (struct sockaddr));
     921    RTMemFree(buf);
    912922    if (ret < 0)
    913923    {
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