Commit e6b1e558 authored by ths's avatar ths
Browse files

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
parent 095f61d2
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment