|
Daniel P. Berrange |
c80b7f |
? mingw-fixes
|
|
Daniel P. Berrange |
c80b7f |
Index: qemud/event.c
|
|
Daniel P. Berrange |
c80b7f |
===================================================================
|
|
Daniel P. Berrange |
c80b7f |
RCS file: /data/cvs/libvirt/qemud/event.c,v
|
|
Daniel P. Berrange |
c80b7f |
retrieving revision 1.17
|
|
Daniel P. Berrange |
c80b7f |
diff -u -p -u -p -r1.17 event.c
|
|
Daniel P. Berrange |
c80b7f |
--- qemud/event.c 22 Dec 2008 12:55:47 -0000 1.17
|
|
Daniel P. Berrange |
c80b7f |
+++ qemud/event.c 5 Feb 2009 17:12:51 -0000
|
|
Daniel P. Berrange |
c80b7f |
@@ -653,6 +653,8 @@ virPollEventToEventHandleType(int events
|
|
Daniel P. Berrange |
c80b7f |
ret |= VIR_EVENT_HANDLE_WRITABLE;
|
|
Daniel P. Berrange |
c80b7f |
if(events & POLLERR)
|
|
Daniel P. Berrange |
c80b7f |
ret |= VIR_EVENT_HANDLE_ERROR;
|
|
Daniel P. Berrange |
c80b7f |
+ if(events & POLLNVAL) /* Treat NVAL as error, since libvirt doesn't distinguish */
|
|
Daniel P. Berrange |
c80b7f |
+ ret |= VIR_EVENT_HANDLE_ERROR;
|
|
Daniel P. Berrange |
c80b7f |
if(events & POLLHUP)
|
|
Daniel P. Berrange |
c80b7f |
ret |= VIR_EVENT_HANDLE_HANGUP;
|
|
Daniel P. Berrange |
c80b7f |
return ret;
|
|
Daniel P. Berrange |
c80b7f |
Index: src/domain_conf.c
|
|
Daniel P. Berrange |
c80b7f |
===================================================================
|
|
Daniel P. Berrange |
c80b7f |
RCS file: /data/cvs/libvirt/src/domain_conf.c,v
|
|
Daniel P. Berrange |
c80b7f |
retrieving revision 1.64
|
|
Daniel P. Berrange |
c80b7f |
diff -u -p -u -p -r1.64 domain_conf.c
|
|
Daniel P. Berrange |
c80b7f |
--- src/domain_conf.c 30 Jan 2009 21:52:22 -0000 1.64
|
|
Daniel P. Berrange |
c80b7f |
+++ src/domain_conf.c 5 Feb 2009 17:12:51 -0000
|
|
Daniel P. Berrange |
c80b7f |
@@ -504,6 +504,7 @@ virDomainObjPtr virDomainAssignDef(virCo
|
|
Daniel P. Berrange |
c80b7f |
domain->state = VIR_DOMAIN_SHUTOFF;
|
|
Daniel P. Berrange |
c80b7f |
domain->def = def;
|
|
Daniel P. Berrange |
c80b7f |
domain->monitor_watch = -1;
|
|
Daniel P. Berrange |
c80b7f |
+ domain->monitor = -1;
|
|
Daniel P. Berrange |
c80b7f |
|
|
Daniel P. Berrange |
c80b7f |
if (VIR_REALLOC_N(doms->objs, doms->count + 1) < 0) {
|
|
Daniel P. Berrange |
c80b7f |
virReportOOMError(conn);
|
|
Daniel P. Berrange |
c80b7f |
Index: src/remote_internal.c
|
|
Daniel P. Berrange |
c80b7f |
===================================================================
|
|
Daniel P. Berrange |
c80b7f |
RCS file: /data/cvs/libvirt/src/remote_internal.c,v
|
|
Daniel P. Berrange |
c80b7f |
retrieving revision 1.136
|
|
Daniel P. Berrange |
c80b7f |
diff -u -p -u -p -r1.136 remote_internal.c
|
|
Daniel P. Berrange |
c80b7f |
--- src/remote_internal.c 3 Feb 2009 13:08:07 -0000 1.136
|
|
Daniel P. Berrange |
c80b7f |
+++ src/remote_internal.c 5 Feb 2009 17:12:52 -0000
|
|
Daniel P. Berrange |
c80b7f |
@@ -6192,17 +6192,17 @@ processCalls(virConnectPtr conn,
|
|
Daniel P. Berrange |
c80b7f |
continue;
|
|
Daniel P. Berrange |
c80b7f |
virReportSystemError(in_open ? NULL : conn, errno,
|
|
Daniel P. Berrange |
c80b7f |
"%s", _("poll on socket failed"));
|
|
Daniel P. Berrange |
c80b7f |
- return -1;
|
|
Daniel P. Berrange |
c80b7f |
+ goto error;
|
|
Daniel P. Berrange |
c80b7f |
}
|
|
Daniel P. Berrange |
c80b7f |
|
|
Daniel P. Berrange |
c80b7f |
if (fds[0].revents & POLLOUT) {
|
|
Daniel P. Berrange |
c80b7f |
if (processCallSend(conn, priv, in_open) < 0)
|
|
Daniel P. Berrange |
c80b7f |
- return -1;
|
|
Daniel P. Berrange |
c80b7f |
+ goto error;
|
|
Daniel P. Berrange |
c80b7f |
}
|
|
Daniel P. Berrange |
c80b7f |
|
|
Daniel P. Berrange |
c80b7f |
if (fds[0].revents & POLLIN) {
|
|
Daniel P. Berrange |
c80b7f |
if (processCallRecv(conn, priv, in_open) < 0)
|
|
Daniel P. Berrange |
c80b7f |
- return -1;
|
|
Daniel P. Berrange |
c80b7f |
+ goto error;
|
|
Daniel P. Berrange |
c80b7f |
}
|
|
Daniel P. Berrange |
c80b7f |
|
|
Daniel P. Berrange |
c80b7f |
/* Iterate through waiting threads and if
|
|
Daniel P. Berrange |
c80b7f |
@@ -6253,9 +6253,21 @@ processCalls(virConnectPtr conn,
|
|
Daniel P. Berrange |
c80b7f |
if (fds[0].revents & (POLLHUP | POLLERR)) {
|
|
Daniel P. Berrange |
c80b7f |
errorf(in_open ? NULL : conn, VIR_ERR_INTERNAL_ERROR,
|
|
Daniel P. Berrange |
c80b7f |
"%s", _("received hangup / error event on socket"));
|
|
Daniel P. Berrange |
c80b7f |
- return -1;
|
|
Daniel P. Berrange |
c80b7f |
+ goto error;
|
|
Daniel P. Berrange |
c80b7f |
}
|
|
Daniel P. Berrange |
c80b7f |
}
|
|
Daniel P. Berrange |
c80b7f |
+
|
|
Daniel P. Berrange |
c80b7f |
+
|
|
Daniel P. Berrange |
c80b7f |
+error:
|
|
Daniel P. Berrange |
c80b7f |
+ priv->waitDispatch = thiscall->next;
|
|
Daniel P. Berrange |
c80b7f |
+ DEBUG("Giving up the buck due to I/O error %d %p %p", thiscall->proc_nr, thiscall, priv->waitDispatch);
|
|
Daniel P. Berrange |
c80b7f |
+ /* See if someone else is still waiting
|
|
Daniel P. Berrange |
c80b7f |
+ * and if so, then pass the buck ! */
|
|
Daniel P. Berrange |
c80b7f |
+ if (priv->waitDispatch) {
|
|
Daniel P. Berrange |
c80b7f |
+ DEBUG("Passing the buck to %d %p", priv->waitDispatch->proc_nr, priv->waitDispatch);
|
|
Daniel P. Berrange |
c80b7f |
+ virCondSignal(&priv->waitDispatch->cond);
|
|
Daniel P. Berrange |
c80b7f |
+ }
|
|
Daniel P. Berrange |
c80b7f |
+ return -1;
|
|
Daniel P. Berrange |
c80b7f |
}
|
|
Daniel P. Berrange |
c80b7f |
|
|
Daniel P. Berrange |
c80b7f |
/*
|