Hi, On Thu, Jul 8, 2010 at 1:08 AM, Inga Stotland <ingas@xxxxxxxxxxxxxx> wrote: > --- > src/adapter.c | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- > src/adapter.h | 4 +- > src/dbus-hci.c | 7 ++-- > src/sdpd.h | 2 + > 4 files changed, 107 insertions(+), 9 deletions(-) > > diff --git a/src/adapter.c b/src/adapter.c > index 8a05356..9be12e7 100644 > --- a/src/adapter.c > +++ b/src/adapter.c > @@ -2716,6 +2716,7 @@ static void append_dict_valist(DBusMessageIter *iter, > DBusMessageIter dict; > const char *key; > int type; > + int n_elements; > void *val; > > dbus_message_iter_open_container(iter, DBUS_TYPE_ARRAY, > @@ -2727,7 +2728,12 @@ static void append_dict_valist(DBusMessageIter *iter, > while (key) { > type = va_arg(var_args, int); > val = va_arg(var_args, void *); > - dict_append_entry(&dict, key, type, val); > + if (type == DBUS_TYPE_ARRAY) { > + n_elements = va_arg(var_args, int); > + if (n_elements > 0) > + dict_append_array(&dict, key, DBUS_TYPE_STRING, val, n_elements); > + } else > + dict_append_entry(&dict, key, type, val); > key = va_arg(var_args, char *); > } Maybe you should separate this from the rest since they will probably be more use of arrays in dictionaries in the future. -- Luiz Augusto von Dentz Computer Engineer -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html