aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstore/xenstored_watch.c
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-03-01 14:51:12 +0000
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-03-01 14:51:12 +0000
commit5d8d99be048899c0438dab4e726238eb97b0440f (patch)
tree47f33af3a57368d29ee163411943b600c933cf67 /tools/xenstore/xenstored_watch.c
parent4bbfa3da11b9d28cb3e17a49193ac2c60fbae09b (diff)
downloadxen-5d8d99be048899c0438dab4e726238eb97b0440f.tar.gz
xen-5d8d99be048899c0438dab4e726238eb97b0440f.tar.bz2
xen-5d8d99be048899c0438dab4e726238eb97b0440f.zip
Fully reset the xenstore connection when a domain is (re)introduced to xenstored.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'tools/xenstore/xenstored_watch.c')
-rw-r--r--tools/xenstore/xenstored_watch.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/xenstore/xenstored_watch.c b/tools/xenstore/xenstored_watch.c
index 3de6e7ace8..4d1a6d5bfb 100644
--- a/tools/xenstore/xenstored_watch.c
+++ b/tools/xenstore/xenstored_watch.c
@@ -185,6 +185,17 @@ void do_unwatch(struct connection *conn, struct buffered_data *in)
send_error(conn, ENOENT);
}
+void conn_delete_all_watches(struct connection *conn)
+{
+ struct watch *watch;
+
+ while ((watch = list_top(&conn->watches, struct watch, list))) {
+ list_del(&watch->list);
+ talloc_free(watch);
+ domain_watch_dec(conn);
+ }
+}
+
#ifdef TESTING
void dump_watches(struct connection *conn)
{