VirtualBox

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


Ignore:
Timestamp:
Apr 12, 2010 7:23:48 AM (15 years ago)
Author:
vboxsync
Message:

NAT: warnings.

File:
1 edited

Legend:

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

    r28166 r28173  
    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
    59 socket is closed. @bugref{4811} Please verif the changed test. */
     58/*
     59 * DO_CHECK_FD_SET is used in dumping events on socket, including POLLNVAL.
     60 * gcc warns about attempts to log POLLNVAL so construction in a last to lines
     61 * used to catch POLLNVAL while logging and return false in case of error while
     62 * normal usage.
     63 */
    6064#  define DO_CHECK_FD_SET(so, events, fdset)                        \
    6165      (   ((so)->so_poll_index != -1)                               \
     
    6367       && ((so)->s == polls[so->so_poll_index].fd)                  \
    6468       && (polls[(so)->so_poll_index].revents & N_(fdset ## _poll)) \
    65        && !(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
     69       && (   N_(fdset ## _poll) == POLLNVAL                        \
     70           || !(polls[(so)->so_poll_index].revents & POLLNVAL)))
    7471
    7572  /* specific for Unix API */
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