mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
Add @releaseDomain watch-event.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
This commit is contained in:
1 parent
1e14a86e33
commit
3586596b0f
2 files changed
+9
-1
No files matched your search
@@ -360,6 +360,9 @@ void do_release(struct connection *conn, const char *domid_str)
|
||||
}
|
||||
|
||||
talloc_free(domain->conn);
|
||||
|
||||
fire_watches(NULL, "@releaseDomain", false);
|
||||
|
||||
send_ack(conn, XS_RELEASE);
|
||||
}
|
||||
|
||||
@@ -367,6 +370,7 @@ void domain_cleanup(void)
|
||||
{
|
||||
xc_dominfo_t dominfo;
|
||||
struct domain *domain, *tmp;
|
||||
int released = 0;
|
||||
|
||||
list_for_each_entry_safe(domain, tmp, &domains, list) {
|
||||
if (xc_domain_getinfo(*xc_handle, domain->domid, 1,
|
||||
@@ -375,7 +379,11 @@ void domain_cleanup(void)
|
||||
!dominfo.dying && !dominfo.crashed && !dominfo.shutdown)
|
||||
continue;
|
||||
talloc_free(domain->conn);
|
||||
released++;
|
||||
}
|
||||
|
||||
if (released)
|
||||
fire_watches(NULL, "@releaseDomain", false);
|
||||
}
|
||||
|
||||
void do_get_domain_path(struct connection *conn, const char *domid_str)
|
||||
|
||||
@@ -132,7 +132,7 @@ void fire_watches(struct connection *conn, const char *node, bool recurse)
|
||||
struct watch *watch;
|
||||
|
||||
/* During transactions, don't fire watches. */
|
||||
if (conn->transaction)
|
||||
if (conn && conn->transaction)
|
||||
return;
|
||||
|
||||
/* Create an event for each watch. Don't send to self. */
|
||||
|
||||