From: Lennart Poettering Date: Sat, 10 Apr 2010 15:39:36 +0000 (+0200) Subject: dbus: make data pointer for properties read-only X-Git-Tag: 0.git+20100605+dfd8ee-1~173 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9f49ee478fdc06c45092f208f1dddd23680ab13;p=systemd dbus: make data pointer for properties read-only --- diff --git a/dbus.c b/dbus.c index 96527ac8..e2f8f3cd 100644 --- a/dbus.c +++ b/dbus.c @@ -697,7 +697,7 @@ DBusHandlerResult bus_default_message_handler(Manager *m, DBusMessage *message, if (!dbus_message_iter_open_container(&iter, DBUS_TYPE_VARIANT, p->signature, &sub)) goto oom; - if ((r = p->append(m, &sub, property, p->data)) < 0) { + if ((r = p->append(m, &sub, property, (void*) p->data)) < 0) { if (r == -ENOMEM) goto oom; @@ -739,7 +739,7 @@ DBusHandlerResult bus_default_message_handler(Manager *m, DBusMessage *message, !dbus_message_iter_open_container(&sub2, DBUS_TYPE_VARIANT, p->signature, &sub3)) goto oom; - if ((r = p->append(m, &sub3, p->property, p->data)) < 0) { + if ((r = p->append(m, &sub3, p->property, (void*) p->data)) < 0) { if (r == -ENOMEM) goto oom; diff --git a/dbus.h b/dbus.h index 06b7e206..5b41877e 100644 --- a/dbus.h +++ b/dbus.h @@ -33,7 +33,7 @@ typedef struct BusProperty { const char *property; /* name of the property */ BusPropertyCallback append; /* Function that is called to serialize this property */ const char *signature; - void *data; /* The data of this property */ + const void *data; /* The data of this property */ } BusProperty; #define BUS_PROPERTIES_INTERFACE \