diff --git a/android/gatt.c b/android/gatt.c
index 3fd88fa..a1570fd 100644
--- a/android/gatt.c
+++ b/android/gatt.c
destroy_device(device);
}
-static void destroy_connection(void *data)
+static void destroy_app_connection(void *data)
{
struct app_connection *conn = data;
/* Remove all clients by given device's */
queue_remove_all(app_connections, match_connection_by_device, dev,
- destroy_connection);
+ destroy_app_connection);
}
static void send_client_primary_notify(void *data, void *user_data)
return device_ref(dev);
}
-static struct app_connection *create_connection(struct gatt_device *device,
+static struct app_connection *create_app_connection(struct gatt_device *device,
struct gatt_app *app)
{
struct app_connection *new_conn;
if (queue_remove(app_connections, connection))
send_app_disconnect_notify(connection, GATT_SUCCESS);
- destroy_connection(connection);
+ destroy_app_connection(connection);
}
static void app_disconnect_devices(struct gatt_app *client)
conn = queue_find(app_connections, match_connection_by_device_and_app,
&conn_match);
if (!conn) {
- conn = create_connection(device, app);
+ conn = create_app_connection(device, app);
if (!conn)
return HAL_STATUS_NOMEM;
}
app = find_app_by_id(id);
if (app)
- create_connection(dev, app);
+ create_app_connection(dev, app);
}
static void connect_confirm(GIOChannel *io, void *user_data)
queue_destroy(gatt_apps, destroy_gatt_app);
gatt_apps = NULL;
- queue_destroy(app_connections, destroy_connection);
+ queue_destroy(app_connections, destroy_app_connection);
app_connections = NULL;
queue_destroy(gatt_devices, destroy_device);