From: Lukasz Rymanowski <lukasz.rymanowski@tieto.com>
To: linux-bluetooth@vger.kernel.org
Cc: szymon.janc@tieto.com, johan.hedberg@gmail.com,
Lukasz Rymanowski <lukasz.rymanowski@tieto.com>
Subject: [PATCH v4 01/38] android/gatt: Rename listen_clients to listen_apps
Date: Wed, 30 Apr 2014 11:13:32 +0200 [thread overview]
Message-ID: <1398849249-5868-2-git-send-email-lukasz.rymanowski@tieto.com> (raw)
In-Reply-To: <1398849249-5868-1-git-send-email-lukasz.rymanowski@tieto.com>
This is because on this list there will be also servers id
---
android/gatt.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/android/gatt.c b/android/gatt.c
index 4775ecc..f9eff30 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -152,7 +152,7 @@ static struct queue *gatt_apps = NULL;
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);
@@ -1380,7 +1380,7 @@ static void set_advertising_cb(uint8_t status, void *user_data)
* 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);
}
@@ -1401,7 +1401,7 @@ static void handle_client_listen(const void *buf, uint16_t len)
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) {
@@ -1410,7 +1410,7 @@ static void handle_client_listen(const void *buf, uint16_t len)
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;
@@ -1418,7 +1418,7 @@ static void handle_client_listen(const void *buf, uint16_t len)
}
/* 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;
}
@@ -1435,8 +1435,8 @@ static void handle_client_listen(const void *buf, uint16_t len)
* 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;
@@ -3503,9 +3503,9 @@ bool bt_gatt_register(struct ipc *ipc, const bdaddr_t *addr)
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");
@@ -3518,8 +3518,8 @@ bool bt_gatt_register(struct ipc *ipc, const bdaddr_t *addr)
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;
}
@@ -3550,6 +3550,6 @@ void bt_gatt_unregister(void)
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;
}
--
1.8.4
next prev parent reply other threads:[~2014-04-30 9:13 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-30 9:13 [PATCH v4 00/38] android/gatt: GATT server implementation Lukasz Rymanowski
2014-04-30 9:13 ` Lukasz Rymanowski [this message]
2014-04-30 9:13 ` [PATCH v4 02/38] android/gatt: Remove redundant find function parameter Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 03/38] android/gatt: Add service functionality Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 04/38] android/gatt: Add implementation of delete service Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 05/38] android/gatt: Add included service implementation Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 06/38] android/gatt: Add characteristic implementation Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 07/38] android/gatt: Add handling of start service command Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 08/38] android/gatt: Add stop service command handling Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 09/38] android/gatt: Add descriptor implementation Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 10/38] android/gatt: Add listening socket for GATT Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 11/38] android/gatt: Assume that each server wants waits for connection Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 12/38] android/gatt: Add ATT msg handler Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 13/38] shared/gatt: Use bdaddr instead of request_id Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 14/38] shared/gatt: Extend read/write callback with offset Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 15/38] shared/gatt: Add att_opcode to read/write callback Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 16/38] android/bluetooth: Add function for getting device Android name Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 17/38] android/gatt: Add register GAP Service Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 18/38] gatt: Add some characteristics uuids Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 19/38] android/gatt: Register device information service Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 20/38] android/gatt: Register GATT service Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 21/38] shared/gatt: Add function to read by group type Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 22/38] shared/gatt: Add function to find by type Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 23/38] shared/gatt: Add function to read " Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 24/38] shared/gatt: Add function to find information Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 25/38] android/gatt: Add support for ATT read by group type Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 26/38] android/gatt: Add support for ATT read by type Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 27/38] shared/gatt: Add support to read from database Lukasz Rymanowski
2014-04-30 9:13 ` [PATCH v4 28/38] android/gatt: Add support to read request Lukasz Rymanowski
2014-04-30 9:14 ` [PATCH v4 29/38] android/gatt: Add MTU request cmd handling Lukasz Rymanowski
2014-04-30 9:14 ` [PATCH v4 30/38] android/gatt: Add Find info gatt server " Lukasz Rymanowski
2014-04-30 9:14 ` [PATCH v4 31/38] shared/gatt: Add support for write request Lukasz Rymanowski
2014-04-30 9:14 ` [PATCH v4 32/38] android/gatt: " Lukasz Rymanowski
2014-04-30 9:14 ` [PATCH v4 33/38] android/gatt: Add support for execute write Lukasz Rymanowski
2014-04-30 9:14 ` [PATCH v4 34/38] android/gatt: Add write_cb to GATT server Lukasz Rymanowski
2014-04-30 9:14 ` [PATCH v4 35/38] android/gatt: Add read_cb for GATT Server Lukasz Rymanowski
2014-04-30 9:14 ` [PATCH v4 36/38] android/hal-gatt-api: Fix IPC definition for send response Lukasz Rymanowski
2014-04-30 9:14 ` [PATCH v4 37/38] android/gatt: Add support for GATT server " Lukasz Rymanowski
2014-04-30 9:14 ` [PATCH v4 38/38] android/gatt: Add support for send indication Lukasz Rymanowski
2014-04-30 11:31 ` [PATCH v4 00/38] android/gatt: GATT server implementation Szymon Janc
2014-04-30 15:31 ` Szymon Janc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1398849249-5868-2-git-send-email-lukasz.rymanowski@tieto.com \
--to=lukasz.rymanowski@tieto.com \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=szymon.janc@tieto.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox