VirtualBox

Changeset 25753 in vbox


Ignore:
Timestamp:
Jan 12, 2010 11:06:46 AM (15 years ago)
Author:
vboxsync
Message:

NAT: use CHECK_FD_SET for FD_CLOSE

File:
1 edited

Legend:

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

    r25752 r25753  
    6363
    6464  /* specific for Unix API */
    65 # define DO_UNIX_CHECK_FD_SET(so, events, fdset ) DO_CHECK_FD_SET((so), (events), fdset)
     65# define DO_UNIX_CHECK_FD_SET(so, events, fdset) DO_CHECK_FD_SET((so), (events), fdset)
    6666  /* specific for Windows Winsock API */
    67 # define DO_WIN_CHECK_FD_SET(so, events, fdset ) 0
     67# define DO_WIN_CHECK_FD_SET(so, events, fdset) 0
    6868
    6969# ifndef RT_OS_LINUX
     
    7676#  define xfds_poll      (POLLPRI)
    7777# endif
     78# define closefds_poll   (POLLHUP)
    7879# define rderr_poll      (POLLERR)
    7980# define rdhup_poll      (POLLHUP)
     
    130131# define xfds_win         FD_OOB
    131132# define xfds_win_bit     FD_OOB_BIT
     133# define closefds_win     FD_CLOSE
     134# define closefds_win_bit FD_CLOSE_BIT
    132135
    133136# define DO_CHECK_FD_SET(so, events, fdset)  \
    134137    (((events).lNetworkEvents & fdset ## _win) && ((events).iErrorCode[fdset ## _win_bit] == 0))
    135138
    136 # define DO_WIN_CHECK_FD_SET(so, events, fdset ) DO_CHECK_FD_SET((so), (events), fdset)
    137 # define DO_UNIX_CHECK_FD_SET(so, events, fdset ) 1 /*specific for Unix API */
     139# define DO_WIN_CHECK_FD_SET(so, events, fdset) DO_CHECK_FD_SET((so), (events), fdset)
     140# define DO_UNIX_CHECK_FD_SET(so, events, fdset) 1 /*specific for Unix API */
    138141
    139142#endif /* RT_OS_WINDOWS */
     
    11311134                TCP_CONNECT(pData, so);
    11321135#if defined(RT_OS_WINDOWS)
    1133                 if (!(NetworkEvents.lNetworkEvents & FD_CLOSE))
     1136                if (!CHECK_FD_SET(so, NetworkEvents, closefds))
    11341137#endif
    11351138                    CONTINUE(tcp);
     
    11471150         * in some cases once FD_CLOSE engaged on socket it could be flashed latter (for some reasons)
    11481151         */
    1149         if (    (NetworkEvents.lNetworkEvents & FD_CLOSE)
     1152        if (    CHECK_FD_SET(so, NetworkEvents, closefds)
    11501153            ||  (so->so_close == 1))
    11511154        {
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