diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2006-09-13 15:00:24 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2006-09-13 15:00:24 +0000 |
commit | 37235c9982179aa98e70b588f1c0df405c7b8329 (patch) | |
tree | 766559a0ca4d4b5e9a42bacd0715458d00f5f349 | |
parent | 50d400b1de38cbf75a2004a53e412dc6343d82bb (diff) |
Remove a nested function since it breaks code generation with some compilers
-rw-r--r-- | hcid/dbus-adapter.c | 15 |
1 files changed, 7 insertions, 8 deletions
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); |