VirtualBox

Ignore:
Timestamp:
Dec 9, 2008 8:35:15 PM (16 years ago)
Author:
vboxsync
Message:

slirp:icmp: ICM socket is out of udp socket queue now. Unix hangs should gone now.

File:
1 edited

Legend:

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

    r15194 r15201  
    1212
    1313#if !defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) || !defined(RT_OS_WINDOWS)
     14
     15# ifdef VBOX_WITH_SLIRP_ICMP
     16#  define DO_ENGAGE_EVENT0(so, fdset, label) DO_ENGAGE_EVENT1((so), (fdset), label)
     17# else /* VBOX_WITH_SLIRP_ICMP */
     18#  define DO_ENGAGE_EVENT0(so, fdset, label) /* ignore */
     19#endif /* !VBOX_WITH_SLIRP_ICMP */
     20
    1421# define DO_ENGAGE_EVENT1(so, fdset, label)         \
    1522    do {                                            \
     
    2633    } while(0)
    2734#else /* defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS) */
     35# define DO_ENGAGE_EVENT0(so, fdset, label) /* ignore */
     36
    2837# define DO_ENGAGE_EVENT1(so, fdset0, label)                                                    \
    2938    do {                                                                                        \
     
    4958#define UDP_ENGAGE_EVENT(so, fdset)                     \
    5059    DO_ENGAGE_EVENT1((so), (fdset), UDP)
     60
     61#define ICMP_ENGAGE_EVENT(so, fdset)                    \
     62    DO_ENGAGE_EVENT0((so), (fdset), UDP)
    5163
    5264static const uint8_t special_ethaddr[6] = {
     
    583595            }
    584596        }
     597        ICMP_ENGAGE_EVENT(&pData->icmp_socket, readfds);
     598        ICMP_ENGAGE_EVENT(&pData->icmp_socket, writefds);
    585599    }
    586600
     
    867881            }
    868882        }
    869 #if defined(VBOX_WITH_SLIRP_ICMP) && defined(RT_OS_WINDOWS)
     883#if defined(VBOX_WITH_SLIRP_ICMP)
     884# if defined(RT_OS_WINDOWS)
    870885        sorecvfrom(pData, &pData->icmp_socket);
    871 #endif
     886# else
     887        if (so->s != -1 && FD_ISSET(so->s, readfds))
     888        {
     889            sorecvfrom(pData, &pData->icmp_socket);
     890        }
     891# endif
     892#endif
    872893    }
    873894
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