VirtualBox

Changeset 28141 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 9, 2010 1:47:50 PM (15 years ago)
Author:
vboxsync
Message:

slirp.c: Attempt at fixing #4811.

File:
1 edited

Legend:

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

    r28023 r28141  
    5656# define DO_POLL_EVENTS(rc, error, so, events, label) do {} while (0)
    5757
     58#if 0/** @todo This doesn't work because linux sets both POLLHUP and POLLERR when the
     59socket is closed. @bugref{4811} Please verif the changed test. */
    5860#  define DO_CHECK_FD_SET(so, events, fdset)                        \
    5961      (   ((so)->so_poll_index != -1)                               \
     
    6264       && (polls[(so)->so_poll_index].revents & N_(fdset ## _poll)) \
    6365       && !(polls[(so)->so_poll_index].revents & (POLLERR|POLLNVAL)))
     66#else
     67#  define DO_CHECK_FD_SET(so, events, fdset)                        \
     68      (   ((so)->so_poll_index != -1)                               \
     69       && ((so)->so_poll_index <= ndfs)                             \
     70       && ((so)->s == polls[so->so_poll_index].fd)                  \
     71       && (polls[(so)->so_poll_index].revents & N_(fdset ## _poll)) \
     72       && !(polls[(so)->so_poll_index].revents & POLLNVAL))
     73#endif
     74
    6475  /* specific for Unix API */
    6576# define DO_UNIX_CHECK_FD_SET(so, events, fdset) DO_CHECK_FD_SET((so), (events), fdset)
     
    11301141        if (    CHECK_FD_SET(so, NetworkEvents, xfds)
    11311142#ifdef RT_OS_DARWIN
    1132             /* Darwin and probably BSD hosts generates POLLPRI|POLLHUB event on receiving TCP.flags.{ACK|URG|FIN} this
    1133              * combination on other Unixs hosts doesn't enter to this branch 
     1143            /* Darwin and probably BSD hosts generates POLLPRI|POLLHUP event on receiving TCP.flags.{ACK|URG|FIN} this
     1144             * combination on other Unixs hosts doesn't enter to this branch
    11341145             */
    11351146            &&  !CHECK_FD_SET(so, NetworkEvents, closefds)
     
    11811192                    Log2(("%R[natsock] errno %d:%s\n", so, errno, strerror(errno)));
    11821193                    break;
    1183                 } 
     1194                }
    11841195            }
    11851196            /* mark the socket for termination _after_ it was drained */
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