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

[Xen-changelog] [xen-unstable] xenstore: fix canonicalize for metanodes



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1207753194 -3600
# Node ID 506c21c5c55547b9445b4f97428e40b5abc7feaa
# Parent  3cac47973e15e674d648e1c9d1be5bba9dd63207
xenstore: fix canonicalize for metanodes

Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
---
 tools/xenstore/xenstored_core.c  |    2 +-
 tools/xenstore/xenstored_watch.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff -r 3cac47973e15 -r 506c21c5c555 tools/xenstore/xenstored_core.c
--- a/tools/xenstore/xenstored_core.c   Wed Apr 09 15:57:31 2008 +0100
+++ b/tools/xenstore/xenstored_core.c   Wed Apr 09 15:59:54 2008 +0100
@@ -722,7 +722,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 3cac47973e15 -r 506c21c5c555 tools/xenstore/xenstored_watch.c
--- a/tools/xenstore/xenstored_watch.c  Wed Apr 09 15:57:31 2008 +0100
+++ b/tools/xenstore/xenstored_watch.c  Wed Apr 09 15:59:54 2008 +0100
@@ -183,7 +183,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


 


Rackspace

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