summaryrefslogtreecommitdiff
path: root/dbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'dbus.c')
-rw-r--r--dbus.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/dbus.c b/dbus.c
index 84b8fbf094..caafc97570 100644
--- a/dbus.c
+++ b/dbus.c
@@ -561,7 +561,9 @@ int bus_property_append_string(Manager *m, DBusMessageIter *i, const char *prope
assert(m);
assert(i);
assert(property);
- assert(t);
+
+ if (!t)
+ t = "";
if (!dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, &t))
return -ENOMEM;
@@ -606,3 +608,27 @@ int bus_property_append_bool(Manager *m, DBusMessageIter *i, const char *propert
return 0;
}
+
+int bus_property_append_uint64(Manager *m, DBusMessageIter *i, const char *property, void *data) {
+ assert(m);
+ assert(i);
+ assert(property);
+ assert(data);
+
+ if (!dbus_message_iter_append_basic(i, DBUS_TYPE_UINT64, data))
+ return -ENOMEM;
+
+ return 0;
+}
+
+int bus_property_append_uint32(Manager *m, DBusMessageIter *i, const char *property, void *data) {
+ assert(m);
+ assert(i);
+ assert(property);
+ assert(data);
+
+ if (!dbus_message_iter_append_basic(i, DBUS_TYPE_UINT32, data))
+ return -ENOMEM;
+
+ return 0;
+}