diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-03-01 14:51:12 +0000 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-03-01 14:51:12 +0000 |
commit | 5d8d99be048899c0438dab4e726238eb97b0440f (patch) | |
tree | 47f33af3a57368d29ee163411943b600c933cf67 /tools/xenstore/xenstored_watch.c | |
parent | 4bbfa3da11b9d28cb3e17a49193ac2c60fbae09b (diff) | |
download | xen-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.c | 11 |
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) { |