summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <cguthrie@mandriva.org>2011-01-03 09:22:33 +0000
committerColin Guthrie <cguthrie@mandriva.org>2011-01-03 09:22:33 +0000
commit06875b67e616f6ade97fda3b41cb7b6d7f9857c1 (patch)
treebd381c682630ffc395b95f05e38dc51cc0027592
parentd28fc0df8997fed0da9ac3f54138f792dc660841 (diff)
Revert "core: make use of dbus_message_iter_append_fixed_array"
This causes problems as outlined in ticket #887. This reverts commit f564c7d76371380980faa10ee3c756c3130c60bf.
-rw-r--r--src/pulsecore/dbus-util.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pulsecore/dbus-util.c b/src/pulsecore/dbus-util.c
index 8b203051..09ab071b 100644
--- a/src/pulsecore/dbus-util.c
+++ b/src/pulsecore/dbus-util.c
@@ -595,14 +595,19 @@ void pa_dbus_send_proplist_variant_reply(DBusConnection *c, DBusMessage *in_repl
void pa_dbus_append_basic_array(DBusMessageIter *iter, int item_type, const void *array, unsigned n) {
DBusMessageIter array_iter;
+ unsigned i;
+ unsigned item_size;
pa_assert(iter);
pa_assert(dbus_type_is_basic(item_type));
pa_assert(array || n == 0);
+ item_size = basic_type_size(item_type);
+
pa_assert_se(dbus_message_iter_open_container(iter, DBUS_TYPE_ARRAY, signature_from_basic_type(item_type), &array_iter));
- pa_assert_se(dbus_message_iter_append_fixed_array(&array_iter, item_type, array, n));
+ for (i = 0; i < n; ++i)
+ pa_assert_se(dbus_message_iter_append_basic(&array_iter, item_type, &((uint8_t*) array)[i * item_size]));
pa_assert_se(dbus_message_iter_close_container(iter, &array_iter));
};