summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hcid/adapter.c12
-rw-r--r--hcid/dbus-hci.c35
-rw-r--r--hcid/dbus-security.c2
-rw-r--r--hcid/dbus-service.c14
-rw-r--r--hcid/device.c2
-rw-r--r--hcid/main.c6
-rw-r--r--hcid/manager.c2
7 files changed, 35 insertions, 38 deletions
diff --git a/hcid/adapter.c b/hcid/adapter.c
index e218eedf..8085c0d6 100644
--- a/hcid/adapter.c
+++ b/hcid/adapter.c
@@ -911,7 +911,7 @@ static DBusHandlerResult adapter_list_minor_classes(DBusConnection *conn,
dbus_message_iter_init_append(reply, &iter);
dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY,
- DBUS_TYPE_STRING_AS_STRING, &array_iter);
+ DBUS_TYPE_STRING_AS_STRING, &array_iter);
for (i = 0; i < size; i++)
dbus_message_iter_append_basic(&array_iter, DBUS_TYPE_STRING,
&minor_ptr[i]);
@@ -1611,7 +1611,7 @@ static DBusHandlerResult adapter_get_remote_service_cls(DBusConnection *conn,
dbus_message_iter_init_append(reply, &iter);
dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY,
- DBUS_TYPE_STRING_AS_STRING, &array_iter);
+ DBUS_TYPE_STRING_AS_STRING, &array_iter);
g_slist_foreach(service_classes, (GFunc) append_class_string,
&array_iter);
@@ -1950,7 +1950,7 @@ gboolean dc_pending_timeout_handler(void *data)
dd = hci_open_dev(adapter->dev_id);
if (dd < 0) {
- error_no_such_adapter(pending_dc->conn,
+ error_no_such_adapter(pending_dc->conn,
pending_dc->msg);
dc_pending_timeout_cleanup(adapter);
return FALSE;
@@ -1959,7 +1959,7 @@ gboolean dc_pending_timeout_handler(void *data)
/* Send the HCI disconnect command */
if (hci_disconnect(dd, pending_dc->conn_handle,
HCI_OE_USER_ENDED_CONNECTION,
- 500) < 0) {
+ 500) < 0) {
int err = errno;
error("Disconnect failed");
error_failed(pending_dc->conn, pending_dc->msg, err);
@@ -2306,7 +2306,7 @@ static DBusHandlerResult adapter_cancel_bonding(DBusConnection *conn,
6, &peer_bdaddr);
hci_close_dev(dd);
- }
+ }
adapter->pin_reqs = g_slist_remove(adapter->pin_reqs, pin_req);
g_free(pin_req);
@@ -2632,7 +2632,7 @@ static DBusHandlerResult adapter_stop_periodic(DBusConnection *conn,
if (!adapter->pdiscov_active)
return error_not_authorized(conn, msg);
- /*
+ /*
* Cleanup the discovered devices list and send the cmd to exit
* from periodic inquiry mode or cancel remote name request.
*/
diff --git a/hcid/dbus-hci.c b/hcid/dbus-hci.c
index 61a14975..dcc550b7 100644
--- a/hcid/dbus-hci.c
+++ b/hcid/dbus-hci.c
@@ -435,7 +435,7 @@ int unregister_adapter_path(const char *path)
/* Check if there is a pending RemoteDeviceDisconnect request */
if (adapter->pending_dc) {
- error_no_such_adapter(adapter->pending_dc->conn,
+ error_no_such_adapter(adapter->pending_dc->conn,
adapter->pending_dc->msg);
g_source_remove(adapter->pending_dc->timeout_id);
dc_pending_timeout_cleanup(adapter);
@@ -606,7 +606,7 @@ int hcid_dbus_start_device(uint16_t id)
if (adapter->mode == MODE_LIMITED)
set_limited_discoverable(dd, adapter->class, TRUE);
- /*
+ /*
* retrieve the active connections: address the scenario where
* the are active connections before the daemon've started
*/
@@ -1077,8 +1077,8 @@ void hcid_dbus_inquiry_complete(bdaddr_t *local)
adapter->pinq_idle = 1;
- /*
- * Enable resolution again: standard inquiry can be
+ /*
+ * Enable resolution again: standard inquiry can be
* received in the periodic inquiry idle state.
*/
if (adapter->pdiscov_requestor && adapter->pdiscov_resolve_names)
@@ -1088,10 +1088,10 @@ void hcid_dbus_inquiry_complete(bdaddr_t *local)
* The following scenarios can happen:
* 1. standard inquiry: always send discovery completed signal
* 2. standard inquiry + name resolving: send discovery completed
- * after name resolving
+ * after name resolving
* 3. periodic inquiry: skip discovery completed signal
* 4. periodic inquiry + standard inquiry: always send discovery
- * completed signal
+ * completed signal
*
* Keep in mind that non D-Bus requests can arrive.
*/
@@ -1112,7 +1112,7 @@ void hcid_dbus_inquiry_complete(bdaddr_t *local)
g_slist_free(adapter->found_devices);
adapter->found_devices = NULL;
- if (adapter->discov_requestor) {
+ if (adapter->discov_requestor) {
name_listener_remove(connection, adapter->discov_requestor,
(name_cb_t) discover_devices_req_exit, adapter);
g_free(adapter->discov_requestor);
@@ -1128,7 +1128,7 @@ void hcid_dbus_inquiry_complete(bdaddr_t *local)
}
/* reset the discover type for standard inquiry only */
- adapter->discov_type &= ~STD_INQUIRY;
+ adapter->discov_type &= ~STD_INQUIRY;
}
done:
@@ -1366,7 +1366,7 @@ void hcid_dbus_inquiry_result(bdaddr_t *local, bdaddr_t *peer, uint32_t class,
if (name_type != 0x08)
name_status = NAME_SENT;
- }
+ }
/* add in the list to track name sent/pending */
found_device_add(&adapter->found_devices, peer, rssi, name_status);
@@ -1430,7 +1430,7 @@ void hcid_dbus_remote_name(bdaddr_t *local, bdaddr_t *peer, uint8_t status,
"RemoteNameFailed",
DBUS_TYPE_STRING, &paddr,
DBUS_TYPE_INVALID);
- else
+ else
dbus_connection_emit_signal(connection, path,
ADAPTER_INTERFACE,
"RemoteNameUpdated",
@@ -1747,11 +1747,8 @@ failed:
return retval;
}
-/*****************************************************************
- *
- * Section reserved to device HCI callbacks
- *
- *****************************************************************/
+/* Section reserved to device HCI callbacks */
+
void hcid_dbus_setname_complete(bdaddr_t *local)
{
int id, dd = -1;
@@ -1830,7 +1827,7 @@ void hcid_dbus_setscan_enable_complete(bdaddr_t *local)
rq.ocf = OCF_READ_SCAN_ENABLE;
rq.rparam = &rp;
rq.rlen = READ_SCAN_ENABLE_RP_SIZE;
- rq.event = EVT_CMD_COMPLETE;
+ rq.event = EVT_CMD_COMPLETE;
if (hci_send_req(dd, &rq, 1000) < 0) {
error("Sending read scan enable command failed: %s (%d)",
@@ -1849,7 +1846,7 @@ void hcid_dbus_setscan_enable_complete(bdaddr_t *local)
error("Getting %s path data failed!", path);
goto failed;
}
-
+
if (adapter->timeout_id) {
g_source_remove(adapter->timeout_id);
adapter->timeout_id = 0;
@@ -2094,7 +2091,7 @@ int cancel_discovery(struct adapter *adapter)
goto cleanup;
}
- /*
+ /*
* If there is a pending read remote name request means
* that the inquiry complete event was already received
*/
@@ -2178,7 +2175,7 @@ int cancel_periodic_discovery(struct adapter *adapter)
struct remote_dev_info *dev, match;
GSList *l;
int dd, err = 0;
-
+
if (!adapter->pdiscov_active)
goto cleanup;
diff --git a/hcid/dbus-security.c b/hcid/dbus-security.c
index 8a16373d..6d510587 100644
--- a/hcid/dbus-security.c
+++ b/hcid/dbus-security.c
@@ -1334,7 +1334,7 @@ void release_passkey_agents(struct adapter *adapter, bdaddr_t *bda)
for (l = adapter->passkey_agents; l != NULL; l = next) {
struct passkey_agent *agent = l->data;
next = l->next;
-
+
if (bda && agent->addr) {
bdaddr_t tmp;
str2ba(agent->addr, &tmp);
diff --git a/hcid/dbus-service.c b/hcid/dbus-service.c
index 1090c057..f66855b4 100644
--- a/hcid/dbus-service.c
+++ b/hcid/dbus-service.c
@@ -88,7 +88,7 @@ static void service_free(struct service *service)
static void service_exit(const char *name, struct service *service)
{
DBusConnection *conn = get_dbus_connection();
-
+
debug("Service owner exited: %s", name);
dbus_connection_emit_signal(conn, service->object_path,
@@ -97,7 +97,7 @@ static void service_exit(const char *name, struct service *service)
if (service->action) {
DBusMessage *reply;
- reply = dbus_message_new_method_return(service->action);
+ reply = dbus_message_new_method_return(service->action);
send_message_and_unref(conn, reply);
dbus_message_unref(service->action);
service->action = NULL;
@@ -160,7 +160,7 @@ static DBusHandlerResult get_identifier(DBusConnection *conn,
if (service->ident)
identifier = service->ident;
-
+
dbus_message_append_args(reply,
DBUS_TYPE_STRING, &identifier,
DBUS_TYPE_INVALID);
@@ -182,7 +182,7 @@ static DBusHandlerResult get_name(DBusConnection *conn,
if (service->name)
name = service->name;
-
+
dbus_message_append_args(reply,
DBUS_TYPE_STRING, &name,
DBUS_TYPE_INVALID);
@@ -203,7 +203,7 @@ static DBusHandlerResult get_description(DBusConnection *conn,
if (service->descr)
description = service->descr;
-
+
dbus_message_append_args(reply,
DBUS_TYPE_STRING, &description,
DBUS_TYPE_INVALID);
@@ -666,7 +666,7 @@ static DBusMethodVTable service_methods[] = {
static DBusSignalVTable service_signals[] = {
{ "Started", "" },
- { "Stopped", "" },
+ { "Stopped", "" },
{ "TrustAdded", "s" },
{ "TrustRemoved", "s" },
{ NULL, NULL }
@@ -789,7 +789,7 @@ cleanup:
services = g_slist_remove(services, service);
service_free(service);
}
-
+
return 0;
}
diff --git a/hcid/device.c b/hcid/device.c
index 7085f078..40cba5c1 100644
--- a/hcid/device.c
+++ b/hcid/device.c
@@ -316,7 +316,7 @@ setup:
if (features[6] & LMP_NFLUSH_PKTS)
events[7] |= 0x01;
-
+
if (features[7] & LMP_LSTO)
events[6] |= 0x80;
diff --git a/hcid/main.c b/hcid/main.c
index 44a25160..cbb8c01c 100644
--- a/hcid/main.c
+++ b/hcid/main.c
@@ -296,8 +296,8 @@ void update_service_classes(const bdaddr_t *bdaddr, uint8_t value)
close(sk);
}
-/*
- * Device name expansion
+/*
+ * Device name expansion
* %d - device id
*/
static char *expand_name(char *dst, int size, char *str, int dev_id)
@@ -358,7 +358,7 @@ static gboolean child_exit(GIOChannel *io, GIOCondition cond, void *user_data)
{
int status, fd = g_io_channel_unix_get_fd(io);
pid_t child_pid;
-
+
if (read(fd, &child_pid, sizeof(child_pid)) != sizeof(child_pid)) {
error("child_exit: unable to read child pid from pipe");
return TRUE;
diff --git a/hcid/manager.c b/hcid/manager.c
index 2c833774..f7e4e29a 100644
--- a/hcid/manager.c
+++ b/hcid/manager.c
@@ -110,7 +110,7 @@ static int find_by_address(const char *str)
bdaddr_t ba;
int i, sk;
int devid = -1;
-
+
sk = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI);
if (sk < 0)
return -1;