Win32 Tap inferface PPC Guest issue, by Ely Soto.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2701 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
ths 2007-04-18 17:56:02 +00:00
parent 095f61d202
commit e6b1e558ac

21
vl.c
View File

@ -6143,7 +6143,7 @@ void main_loop_wait(int timeout)
{
IOHandlerRecord *ioh;
fd_set rfds, wfds, xfds;
int ret, nfds;
int ret, ret2, nfds, i;
struct timeval tv;
PollingEntry *pe;
@ -6154,7 +6154,7 @@ void main_loop_wait(int timeout)
ret |= pe->func(pe->opaque);
}
#ifdef _WIN32
if (ret == 0 && timeout > 0) {
if (ret == 0) {
int err;
WaitObjects *w = &wait_objects;
@ -6162,10 +6162,25 @@ void main_loop_wait(int timeout)
if (WAIT_OBJECT_0 + 0 <= ret && ret <= WAIT_OBJECT_0 + w->num - 1) {
if (w->func[ret - WAIT_OBJECT_0])
w->func[ret - WAIT_OBJECT_0](w->opaque[ret - WAIT_OBJECT_0]);
/* Check for additional signaled events */
for(i = (ret - WAIT_OBJECT_0 + 1); i < w->num; i++) {
/* Check if event is signaled */
ret2 = WaitForSingleObject(w->events[i], 0);
if(ret2 == WAIT_OBJECT_0) {
if (w->func[i])
w->func[i](w->opaque[i]);
} else if (ret2 == WAIT_TIMEOUT) {
} else {
err = GetLastError();
fprintf(stderr, "WaitForSingleObject error %d %d\n", i, err);
}
}
} else if (ret == WAIT_TIMEOUT) {
} else {
err = GetLastError();
fprintf(stderr, "Wait error %d %d\n", ret, err);
fprintf(stderr, "WaitForMultipleObjects error %d %d\n", ret, err);
}
}
#endif