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:
gardners 2012-04-22 20:17:32 +09:30
parent e8eaa32227
commit b3cc3eb644

6
vomp.c
View File

@ -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) {