summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hcid/dbus-adapter.c8
-rw-r--r--hcid/dbus-sdp.c4
-rw-r--r--hcid/dbus-security.c23
-rw-r--r--hcid/dbus.c34
4 files changed, 35 insertions, 34 deletions
diff --git a/hcid/dbus-adapter.c b/hcid/dbus-adapter.c
index 54ee49ab..0c405b2a 100644
--- a/hcid/dbus-adapter.c
+++ b/hcid/dbus-adapter.c
@@ -1300,7 +1300,7 @@ static DBusHandlerResult handle_dev_get_remote_service_cls_req(DBusConnection *c
dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY,
DBUS_TYPE_STRING_AS_STRING, &array_iter);
- slist_foreach(service_classes, (slist_func_t)append_class_string, &array_iter);
+ slist_foreach(service_classes, (slist_func_t) append_class_string, &array_iter);
dbus_message_iter_close_container(&iter, &array_iter);
@@ -1782,7 +1782,7 @@ static DBusHandlerResult handle_dev_create_bonding_req(DBusConnection *conn, DBu
dbus_data->bonding->rq = dbus_message_ref(msg);
name_listener_add(conn, dbus_message_get_sender(msg),
- (name_cb_t)create_bond_req_exit, dbus_data);
+ (name_cb_t) create_bond_req_exit, dbus_data);
hci_close_dev(dd);
@@ -1879,7 +1879,7 @@ static DBusHandlerResult handle_dev_cancel_bonding_req(DBusConnection *conn, DBu
error_authentication_canceled(conn, dbus_data->bonding->rq);
name_listener_remove(conn, dbus_message_get_sender(dbus_data->bonding->rq),
- (name_cb_t)create_bond_req_exit, dbus_data);
+ (name_cb_t) create_bond_req_exit, dbus_data);
/* disconnect from the remote device */
if (dbus_data->bonding->disconnect) {
@@ -2276,7 +2276,7 @@ static DBusHandlerResult handle_dev_cancel_discovery_req(DBusConnection *conn, D
return error_failed(conn, msg, bt_error(status));
}
- slist_foreach(dbus_data->disc_devices, (slist_func_t)free, NULL);
+ slist_foreach(dbus_data->disc_devices, (slist_func_t) free, NULL);
slist_free(dbus_data->disc_devices);
dbus_data->disc_devices = NULL;
diff --git a/hcid/dbus-sdp.c b/hcid/dbus-sdp.c
index caae8184..2b0b2fef 100644
--- a/hcid/dbus-sdp.c
+++ b/hcid/dbus-sdp.c
@@ -990,7 +990,7 @@ static DBusHandlerResult register_rfcomm(DBusConnection *conn,
psearch.owner = (char *)owner;
if (!slist_find(sdp_cache, &psearch, service_provider_cmp))
- name_listener_add(conn, owner, (name_cb_t)owner_exited, dbus_data);
+ name_listener_add(conn, owner, (name_cb_t) owner_exited, dbus_data);
/* add record in the cache */
id = sdp_cache_append(owner, dbus_data->address, rec);
@@ -1072,7 +1072,7 @@ static DBusHandlerResult unregister_rfcomm(DBusConnection *conn,
/* Only remove the D-Bus unique name listener if there are no more record using this name */
if (!slist_find(sdp_cache, &psearch, service_provider_cmp))
- name_listener_remove(conn, owner, (name_cb_t)owner_exited, dbus_data);
+ name_listener_remove(conn, owner, (name_cb_t) owner_exited, dbus_data);
return send_reply_and_unref(conn, reply);
}
diff --git a/hcid/dbus-security.c b/hcid/dbus-security.c
index 1de27fa2..8fd723fd 100644
--- a/hcid/dbus-security.c
+++ b/hcid/dbus-security.c
@@ -233,7 +233,7 @@ static DBusHandlerResult register_agent(DBusConnection *conn,
ref.addr = addr;
ref.path = path;
- if (slist_find(adapter->passkey_agents, &ref, (cmp_func_t)agent_cmp))
+ if (slist_find(adapter->passkey_agents, &ref, (cmp_func_t) agent_cmp))
return error_passkey_agent_already_exists(conn, msg);
agent = passkey_agent_new(adapter, conn, ref.name, path, addr);
@@ -250,8 +250,8 @@ static DBusHandlerResult register_agent(DBusConnection *conn,
/* Only add a name listener if there isn't one already for this name */
ref.addr = NULL;
ref.path = NULL;
- if (!slist_find(adapter->passkey_agents, &ref, (cmp_func_t)agent_cmp))
- name_listener_add(conn, ref.name, (name_cb_t)agent_exited, adapter);
+ if (!slist_find(adapter->passkey_agents, &ref, (cmp_func_t) agent_cmp))
+ name_listener_add(conn, ref.name, (name_cb_t) agent_exited, adapter);
agent->timeout = g_timeout_add(AGENT_TIMEOUT, (GSourceFunc)agent_timeout, agent);
@@ -288,14 +288,14 @@ static DBusHandlerResult unregister_agent(DBusConnection *conn,
ref.path = path;
ref.addr = addr;
- match = slist_find(adapter->passkey_agents, &ref, (cmp_func_t)agent_cmp);
+ match = slist_find(adapter->passkey_agents, &ref, (cmp_func_t) agent_cmp);
if (!match)
return error_passkey_agent_does_not_exist(conn, msg);
agent = match->data;
name_listener_remove(agent->conn, agent->name,
- (name_cb_t)agent_exited, adapter);
+ (name_cb_t) agent_exited, adapter);
adapter->passkey_agents = slist_remove(adapter->passkey_agents, agent);
agent->exited = 1;
@@ -322,7 +322,8 @@ static DBusHandlerResult register_default_agent(DBusConnection *conn,
DBUS_TYPE_INVALID))
return error_invalid_arguments(conn, msg);
- default_agent = passkey_agent_new(NULL, conn, dbus_message_get_sender(msg), path, NULL);
+ default_agent = passkey_agent_new(NULL, conn, dbus_message_get_sender(msg),
+ path, NULL);
if (!default_agent)
goto need_memory;
@@ -331,7 +332,7 @@ static DBusHandlerResult register_default_agent(DBusConnection *conn,
goto need_memory;
name_listener_add(conn, default_agent->name,
- (name_cb_t)default_agent_exited, NULL);
+ (name_cb_t) default_agent_exited, NULL);
info("Default passkey agent (%s, %s) registered",
default_agent->name, default_agent->path);
@@ -373,7 +374,7 @@ static DBusHandlerResult unregister_default_agent(DBusConnection *conn,
return DBUS_HANDLER_RESULT_NEED_MEMORY;
name_listener_remove(conn, default_agent->name,
- (name_cb_t)default_agent_exited, NULL);
+ (name_cb_t) default_agent_exited, NULL);
info("Default passkey agent (%s, %s) unregistered",
default_agent->name, default_agent->path);
@@ -630,16 +631,16 @@ static void release_agent(struct passkey_agent *agent)
if (agent == default_agent)
name_listener_remove(agent->conn, agent->name,
- (name_cb_t)default_agent_exited, NULL);
+ (name_cb_t) default_agent_exited, NULL);
else {
struct passkey_agent ref;
/* Only remove the name listener if there are no more agents for this name */
memset(&ref, 0, sizeof(ref));
ref.name = agent->name;
- if (!slist_find(agent->pdata->passkey_agents, &ref, (cmp_func_t)agent_cmp))
+ if (!slist_find(agent->pdata->passkey_agents, &ref, (cmp_func_t) agent_cmp))
name_listener_remove(agent->conn, ref.name,
- (name_cb_t)agent_exited, agent->pdata);
+ (name_cb_t) agent_exited, agent->pdata);
}
}
diff --git a/hcid/dbus.c b/hcid/dbus.c
index bb70d34c..29a81cef 100644
--- a/hcid/dbus.c
+++ b/hcid/dbus.c
@@ -116,7 +116,7 @@ int disc_device_append(struct slist **list, bdaddr_t *bdaddr, name_status_t name
match.name_status = NAME_ANY;
/* ignore repeated entries */
- l = slist_find(*list, &match, (cmp_func_t)disc_device_find);
+ l = slist_find(*list, &match, (cmp_func_t) disc_device_find);
if (l) {
/* device found, update the attributes */
dev = l->data;
@@ -150,7 +150,7 @@ static int disc_device_remove(struct slist **list, bdaddr_t *bdaddr)
memset(&match, 0, sizeof(struct discovered_dev_info));
bacpy(&match.bdaddr, bdaddr);
- l = slist_find(*list, &match, (cmp_func_t)disc_device_find);
+ l = slist_find(*list, &match, (cmp_func_t) disc_device_find);
if (l) {
dev = l->data;
@@ -374,7 +374,7 @@ static void reply_pending_requests(const char *path, struct hci_dbus_data *pdata
if (pdata->bonding) {
error_authentication_canceled(connection, pdata->bonding->rq);
name_listener_remove(connection, dbus_message_get_sender(pdata->bonding->rq),
- (name_cb_t)create_bond_req_exit, pdata);
+ (name_cb_t) create_bond_req_exit, pdata);
bonding_request_free(pdata->bonding);
pdata->bonding = NULL;
}
@@ -409,19 +409,19 @@ static int unregister_dbus_path(const char *path)
}
if (pdata->disc_devices) {
- slist_foreach(pdata->disc_devices, (slist_func_t)free, NULL);
+ slist_foreach(pdata->disc_devices, (slist_func_t) free, NULL);
slist_free(pdata->disc_devices);
pdata->disc_devices = NULL;
}
if (pdata->pending_bondings) {
- slist_foreach(pdata->pending_bondings, (slist_func_t)free, NULL);
+ slist_foreach(pdata->pending_bondings, (slist_func_t) free, NULL);
slist_free(pdata->pending_bondings);
pdata->pending_bondings = NULL;
}
if (pdata->active_conn) {
- slist_foreach(pdata->active_conn, (slist_func_t)free, NULL);
+ slist_foreach(pdata->active_conn, (slist_func_t) free, NULL);
slist_free(pdata->active_conn);
pdata->active_conn = NULL;
}
@@ -651,19 +651,19 @@ int hcid_dbus_stop_device(uint16_t id)
}
if (pdata->disc_devices) {
- slist_foreach(pdata->disc_devices, (slist_func_t)free, NULL);
+ slist_foreach(pdata->disc_devices, (slist_func_t) free, NULL);
slist_free(pdata->disc_devices);
pdata->disc_devices = NULL;
}
if (pdata->pending_bondings) {
- slist_foreach(pdata->pending_bondings, (slist_func_t)free, NULL);
+ slist_foreach(pdata->pending_bondings, (slist_func_t) free, NULL);
slist_free(pdata->pending_bondings);
pdata->pending_bondings = NULL;
}
if (pdata->active_conn) {
- slist_foreach(pdata->active_conn, (slist_func_t)free, NULL);
+ slist_foreach(pdata->active_conn, (slist_func_t) free, NULL);
slist_free(pdata->active_conn);
pdata->active_conn = NULL;
}
@@ -799,7 +799,7 @@ void hcid_dbus_bonding_process_complete(bdaddr_t *local, bdaddr_t *peer, const u
send_reply_and_unref(connection, message);
name_listener_remove(connection, dbus_message_get_sender(pdata->bonding->rq),
- (name_cb_t)create_bond_req_exit, pdata);
+ (name_cb_t) create_bond_req_exit, pdata);
bonding_request_free(pdata->bonding);
pdata->bonding = NULL;
@@ -923,7 +923,7 @@ int disc_device_req_name(struct hci_dbus_data *dbus_data)
match.name_status = NAME_PENDING;
match.discover_type = RESOLVE_NAME;
- l = slist_find(dbus_data->disc_devices, &match, (cmp_func_t)disc_device_find);
+ l = slist_find(dbus_data->disc_devices, &match, (cmp_func_t) disc_device_find);
if (!l)
return ret_val;
@@ -982,7 +982,7 @@ int disc_device_req_name(struct hci_dbus_data *dbus_data)
free(dev);
/* get the next element */
- l = slist_find(dbus_data->disc_devices, &match, (cmp_func_t)disc_device_find);
+ l = slist_find(dbus_data->disc_devices, &match, (cmp_func_t) disc_device_find);
/* no more devices: exit */
if (!l)
@@ -1035,7 +1035,7 @@ void hcid_dbus_inquiry_complete(bdaddr_t *local)
pdata->discover_state = STATE_IDLE;
/* free discovered devices list */
- slist_foreach(pdata->disc_devices, (slist_func_t)free, NULL);
+ slist_foreach(pdata->disc_devices, (slist_func_t) free, NULL);
slist_free(pdata->disc_devices);
pdata->disc_devices = NULL;
@@ -1107,7 +1107,7 @@ void hcid_dbus_inquiry_result(bdaddr_t *local, bdaddr_t *peer, uint32_t class, i
bacpy(&match.bdaddr, peer);
match.name_status = NAME_SENT;
/* if found: don't sent the name again */
- l = slist_find(pdata->disc_devices, &match, (cmp_func_t)disc_device_find);
+ l = slist_find(pdata->disc_devices, &match, (cmp_func_t) disc_device_find);
if (l)
goto failed;
@@ -1215,7 +1215,7 @@ void hcid_dbus_remote_name(bdaddr_t *local, bdaddr_t *peer, uint8_t status, char
goto failed; /* skip if a new request has been sent */
/* free discovered devices list */
- slist_foreach(pdata->disc_devices, (slist_func_t)free, NULL);
+ slist_foreach(pdata->disc_devices, (slist_func_t) free, NULL);
slist_free(pdata->disc_devices);
pdata->disc_devices = NULL;
@@ -1336,7 +1336,7 @@ void hcid_dbus_conn_complete(bdaddr_t *local, uint8_t status, uint16_t handle, b
bonding_failed:
/* free bonding request if the HCI pairing request was not sent */
name_listener_remove(connection, dbus_message_get_sender(pdata->bonding->rq),
- (name_cb_t)create_bond_req_exit, pdata);
+ (name_cb_t) create_bond_req_exit, pdata);
bonding_request_free(pdata->bonding);
pdata->bonding = NULL;
@@ -1400,7 +1400,7 @@ void hcid_dbus_disconn_complete(bdaddr_t *local, uint8_t status, uint16_t handle
send_reply_and_unref(connection, message);
name_listener_remove(connection, dbus_message_get_sender(pdata->bonding->rq),
- (name_cb_t)create_bond_req_exit, pdata);
+ (name_cb_t) create_bond_req_exit, pdata);
bonding_request_free(pdata->bonding);
pdata->bonding = NULL;
}