[systemd-commits] src/libsystemd-bus
Kay Sievers
kay at kemper.freedesktop.org
Sun Oct 20 15:21:38 PDT 2013
src/libsystemd-bus/bus-objects.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit af8601fa8b035426bba7916ebe08e4568d2e2cbd
Author: Kay Sievers <kay at vrfy.org>
Date: Mon Oct 21 00:18:00 2013 +0200
bus: allow to specify NULL as an empty string to add
diff --git a/src/libsystemd-bus/bus-objects.c b/src/libsystemd-bus/bus-objects.c
index 0c935e9..90417fd 100644
--- a/src/libsystemd-bus/bus-objects.c
+++ b/src/libsystemd-bus/bus-objects.c
@@ -313,7 +313,7 @@ static int invoke_property_get(
void *userdata) {
int r;
- void *p;
+ const void *p;
assert(bus);
assert(v);
@@ -333,6 +333,11 @@ static int invoke_property_get(
switch (v->x.property.signature[0]) {
case SD_BUS_TYPE_STRING:
+ p = *(char**) userdata;
+ if (!p)
+ p = "";
+ break;
+
case SD_BUS_TYPE_OBJECT_PATH:
case SD_BUS_TYPE_SIGNATURE:
p = *(char**) userdata;
More information about the systemd-commits
mailing list