summaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-01-19 13:49:41 +0000
committerMarcel Holtmann <marcel@holtmann.org>2007-01-19 13:49:41 +0000
commitd4ce0f576380eabd35340f86f7904a0d6d36367d (patch)
treecb8af60caae8b84796ffe0e3bfbc14182df97fb9 /daemon
parent3f0c72322c19f6e0629c440f6036a836938468ad (diff)
Add test code for binary record registration
Diffstat (limited to 'daemon')
-rw-r--r--daemon/database.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/daemon/database.c b/daemon/database.c
index 46908ca4..798a8686 100644
--- a/daemon/database.c
+++ b/daemon/database.c
@@ -84,7 +84,20 @@ static DBusHandlerResult add_service_record(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBusMessage *reply;
+ DBusMessageIter iter, array;
dbus_uint32_t handle = 0x12345;
+ const uint8_t *record;
+ int i, len = -1;
+
+ dbus_message_iter_init(msg, &iter);
+ dbus_message_iter_recurse(&iter, &array);
+
+ dbus_message_iter_get_fixed_array(&array, &record, &len);
+ if (len < 0)
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+
+ for (i = 0; i < len; i++)
+ debug("0x%02x", record[i]);
reply = dbus_message_new_method_return(msg);
if (!reply)