From 37235c9982179aa98e70b588f1c0df405c7b8329 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 13 Sep 2006 15:00:24 +0000 Subject: Remove a nested function since it breaks code generation with some compilers --- hcid/dbus-adapter.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'hcid') diff --git a/hcid/dbus-adapter.c b/hcid/dbus-adapter.c index 0011ee8c..bfe7ae9a 100644 --- a/hcid/dbus-adapter.c +++ b/hcid/dbus-adapter.c @@ -2064,15 +2064,14 @@ static DBusHandlerResult handle_dev_has_bonding_req(DBusConnection *conn, DBusMe return send_reply_and_unref(conn, reply); } -static DBusHandlerResult handle_dev_list_bondings_req(DBusConnection *conn, DBusMessage *msg, void *data) +static void list_bondings_do_append(char *key, char *value, void *data) { - void do_append(char *key, char *value, void *data) - { - DBusMessageIter *iter = data; - - dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &key); - } + DBusMessageIter *iter = data; + dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &key); +} +static DBusHandlerResult handle_dev_list_bondings_req(DBusConnection *conn, DBusMessage *msg, void *data) +{ struct hci_dbus_data *dbus_data = data; DBusMessageIter iter; DBusMessageIter array_iter; @@ -2091,7 +2090,7 @@ static DBusHandlerResult handle_dev_list_bondings_req(DBusConnection *conn, DBus dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING_AS_STRING, &array_iter); - textfile_foreach(filename, do_append, &array_iter); + textfile_foreach(filename, list_bondings_do_append, &array_iter); dbus_message_iter_close_container(&iter, &array_iter); -- cgit