mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-02-20 17:33:08 +00:00
changed poll behaviour in vomp monitor so that it avoids poll/select
bug on OSX and thus doesn't use 100% CPU.
This commit is contained in:
parent
e8eaa32227
commit
b3cc3eb644
6
vomp.c
6
vomp.c
@ -1019,7 +1019,11 @@ int app_vomp_monitor(int argc, char **argv, struct command_line_option *o)
|
||||
while(!servalShutdown) {
|
||||
overlay_mdp_frame rx;
|
||||
int ttl;
|
||||
if (overlay_mdp_client_poll(0)>0)
|
||||
/* In theory we should be able to ask for a timeout of -1 for
|
||||
infinity, but broken poll() and select() implementations on OSX
|
||||
make this impossible. So one unnecessary check per second is
|
||||
probably tolerable. */
|
||||
if (overlay_mdp_client_poll(1000)>0)
|
||||
if (!overlay_mdp_recv(&rx,&ttl))
|
||||
{
|
||||
switch(rx.packetTypeAndFlags) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user