diff --git a/android/gatt.c b/android/gatt.c
index ef81efd..0bb5a70 100644
--- a/android/gatt.c
+++ b/android/gatt.c
static struct queue *gatt_devices = NULL;
static struct queue *app_connections = NULL;
-static struct queue *listen_clients = NULL;
+static struct queue *listen_apps = NULL;
static void bt_le_discovery_stop_cb(void);
* 2. Stop succeed
*/
if ((l->start && status) || (!l->start && !status))
- queue_remove(listen_clients, INT_TO_PTR(l->client_id));
+ queue_remove(listen_apps, INT_TO_PTR(l->client_id));
free(l);
}
goto reply;
}
- listening_client = queue_find(listen_clients, match_by_value,
+ listening_client = queue_find(listen_apps, match_by_value,
INT_TO_PTR(cmd->client_if));
/* Start listening */
if (cmd->start) {
goto reply;
}
- if (!queue_push_tail(listen_clients,
+ if (!queue_push_tail(listen_apps,
INT_TO_PTR(cmd->client_if))) {
error("gatt: Could not put client on listen queue");
status = HAL_STATUS_FAILED;
}
/* If listen is already on just return success*/
- if (queue_length(listen_clients) > 1) {
+ if (queue_length(listen_apps) > 1) {
status = HAL_STATUS_SUCCESS;
goto reply;
}
* In case there is more listening clients don't stop
* advertising
*/
- if (queue_length(listen_clients) > 1) {
- queue_remove(listen_clients,
+ if (queue_length(listen_apps) > 1) {
+ queue_remove(listen_apps,
INT_TO_PTR(cmd->client_if));
status = HAL_STATUS_SUCCESS;
goto reply;
gatt_devices = queue_new();
gatt_apps = queue_new();
app_connections = queue_new();
- listen_clients = queue_new();
+ listen_apps = queue_new();
- if (!gatt_devices || !gatt_apps || !listen_clients ||
+ if (!gatt_devices || !gatt_apps || !listen_apps ||
!app_connections) {
error("gatt: Failed to allocate memory for queues");
queue_destroy(app_connections, NULL);
app_connections = NULL;
- queue_destroy(listen_clients, NULL);
- listen_clients = NULL;
+ queue_destroy(listen_apps, NULL);
+ listen_apps = NULL;
return false;
}
queue_destroy(gatt_devices, destroy_device);
gatt_devices = NULL;
- queue_destroy(listen_clients, NULL);
- listen_clients = NULL;
+ queue_destroy(listen_apps, NULL);
+ listen_apps = NULL;
}