summaryrefslogtreecommitdiff
path: root/src/dbus-common.c
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2012-04-06 21:38:00 +0200
committerLennart Poettering <lennart@poettering.net>2012-04-10 22:41:15 +0200
commit9612f07cbf2b0ec54c5dc6ed7e521e181cc3612d (patch)
treeb453f14054194aac7fed67ece5897d70373a8920 /src/dbus-common.c
parent56bcbfa5f80ce6f1da5bb38e336b213be5ed0df0 (diff)
dbus: add data argument to BusPropertySetCallback
BusPropertyCallback already has the argument. It is necesary for the callback to know what data to access.
Diffstat (limited to 'src/dbus-common.c')
-rw-r--r--src/dbus-common.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dbus-common.c b/src/dbus-common.c
index 2905ac3c83..fc97108e95 100644
--- a/src/dbus-common.c
+++ b/src/dbus-common.c
@@ -402,6 +402,7 @@ get_prop:
const BusProperty *p;
DBusMessageIter sub;
char *sig;
+ void *data;
if (!dbus_message_iter_init(message, &iter) ||
dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
@@ -456,7 +457,10 @@ set_prop:
dbus_free(sig);
- r = p->set(&sub, property);
+ data = (char*)bp->base + p->offset;
+ if (p->indirect)
+ data = *(void**)data;
+ r = p->set(&sub, property, data);
if (r < 0) {
if (r == -ENOMEM)
goto oom;