From a6278b88305b237b02eabff0d870b57fe851822d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 11 Mar 2014 19:03:50 +0100 Subject: bus: replace sd_bus_label_{escape,unescape}() by new sd_bus_path_{encode,decode}() The new calls work similarly, but enforce a that a common, fixed bus path prefix is used. This follows discussions with Simon McVittie on IRC that it should be a good idea to make sure that people don't use the escaping applied here too wildly as anything other than the last label of a bus path. --- src/login/logind-session-dbus.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/login/logind-session-dbus.c') diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c index c3d4d60158..ffdc5582dc 100644 --- a/src/login/logind-session-dbus.c +++ b/src/login/logind-session-dbus.c @@ -27,6 +27,7 @@ #include "strv.h" #include "bus-util.h" #include "bus-errors.h" +#include "bus-label.h" #include "logind.h" #include "logind-session.h" @@ -515,7 +516,7 @@ int session_object_find(sd_bus *bus, const char *path, const char *interface, vo if (!p) return 0; - e = sd_bus_label_unescape(p); + e = bus_label_unescape(p); if (!e) return -ENOMEM; @@ -533,7 +534,7 @@ char *session_bus_path(Session *s) { assert(s); - t = sd_bus_label_escape(s->id); + t = bus_label_escape(s->id); if (!t) return NULL; -- cgit v1.2.3-54-g00ecf