VirtualBox

Ignore:
Timestamp:
Dec 10, 2008 5:21:43 PM (16 years ago)
Author:
vboxsync
Message:

slirp: don't try to receive ICMP every time but only if the event is active

File:
1 edited

Legend:

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

    r15244 r15266  
    654654}
    655655
     656#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
     657void slirp_select_poll(PNATState pData, int fTimeout, int fIcmp)
     658#else
    656659void slirp_select_poll(PNATState pData, fd_set *readfds, fd_set *writefds, fd_set *xfds)
     660#endif
    657661{
    658662    struct socket *so, *so_next;
     
    700704    }
    701705#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
    702     if (!readfds && !writefds && !xfds)
     706    if (fTimeout)
    703707        return; /* only timer update */
    704708#endif
     
    908912#if defined(VBOX_WITH_SLIRP_ICMP)
    909913# if defined(RT_OS_WINDOWS)
    910         sorecvfrom(pData, &pData->icmp_socket);
     914        if (fIcmp)
     915            sorecvfrom(pData, &pData->icmp_socket);
    911916# else
    912917        if (pData->icmp_socket.s != -1 && FD_ISSET(pData->icmp_socket.s, readfds))
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