Fix xenstore unwatch with node name starting with "@"
authorKeir Fraser <keir@xensource.com>
Wed, 17 Oct 2007 09:02:49 +0000 (10:02 +0100)
committerKeir Fraser <keir@xensource.com>
Wed, 17 Oct 2007 09:02:49 +0000 (10:02 +0100)
Watch node starting with "@" should not be canonicalized.
Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
tools/xenstore/xenstored_watch.c

index f5692f83e5763572559e4b5fdac50d3d450b51ad..5fa8bbbe226cf42ec2e14525b338767c8499323f 100644 (file)
@@ -170,7 +170,7 @@ void do_unwatch(struct connection *conn, struct buffered_data *in)
                return;
        }
 
-       node = canonicalize(conn, vec[0]);
+       node = strstarts(vec[0], "@") ? vec[0] : canonicalize(conn, vec[0]);
        list_for_each_entry(watch, &conn->watches, list) {
                if (streq(watch->node, node) && streq(watch->token, vec[1])) {
                        list_del(&watch->list);