[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Add @releaseDomain watch-event.



# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID 513ba63787fe3f891284e0502fb1dc4cdeb605d7
# Parent  7c269dd2cf1ffa8f3d2eeef6c70c8b9dd7920af1
Add @releaseDomain watch-event.
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r 7c269dd2cf1f -r 513ba63787fe tools/xenstore/xenstored_domain.c
--- a/tools/xenstore/xenstored_domain.c Tue Sep  6 18:14:31 2005
+++ b/tools/xenstore/xenstored_domain.c Tue Sep  6 18:15:06 2005
@@ -360,6 +360,9 @@
        }
 
        talloc_free(domain->conn);
+
+       fire_watches(NULL, "@releaseDomain", false);
+
        send_ack(conn, XS_RELEASE);
 }
 
@@ -367,6 +370,7 @@
 {
        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 @@
                    !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)
diff -r 7c269dd2cf1f -r 513ba63787fe tools/xenstore/xenstored_watch.c
--- a/tools/xenstore/xenstored_watch.c  Tue Sep  6 18:14:31 2005
+++ b/tools/xenstore/xenstored_watch.c  Tue Sep  6 18:15:06 2005
@@ -132,7 +132,7 @@
        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. */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.