# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1207756775 -3600
# Node ID fe6e23c8ed76f9124e0c983eeb668dbd33ad34cb
# Parent f09ebcbd239e3572ee8b607d5aa16595614de838
xenstore: fix canonicalize for metanodes
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
xen-unstable changeset: 17418:506c21c5c55547b9445b4f97428e40b5abc7feaa
xen-unstable date: Wed Apr 09 15:59:54 2008 +0100
---
tools/xenstore/xenstored_core.c | 2 +-
tools/xenstore/xenstored_watch.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff -r f09ebcbd239e -r fe6e23c8ed76 tools/xenstore/xenstored_core.c
--- a/tools/xenstore/xenstored_core.c Wed Apr 09 16:59:14 2008 +0100
+++ b/tools/xenstore/xenstored_core.c Wed Apr 09 16:59:35 2008 +0100
@@ -690,7 +690,7 @@ char *canonicalize(struct connection *co
{
const char *prefix;
- if (!node || strstarts(node, "/"))
+ if (!node || (node[0] == '/') || (node[0] == '@'))
return (char *)node;
prefix = get_implicit_path(conn);
if (prefix)
diff -r f09ebcbd239e -r fe6e23c8ed76 tools/xenstore/xenstored_watch.c
--- a/tools/xenstore/xenstored_watch.c Wed Apr 09 16:59:14 2008 +0100
+++ b/tools/xenstore/xenstored_watch.c Wed Apr 09 16:59:35 2008 +0100
@@ -170,7 +170,7 @@ void do_unwatch(struct connection *conn,
return;
}
- node = strstarts(vec[0], "@") ? vec[0] : canonicalize(conn, vec[0]);
+ node = 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);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|