diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c
index 8486b09..4c563c2 100644
--- a/src/shared/gatt-client.c
+++ b/src/shared/gatt-client.c
struct bt_gatt_client *client;
struct queue *pending_svcs;
struct queue *pending_chrcs;
- struct queue *tmp_queue;
+ struct queue *svcs;
struct gatt_db_attribute *cur_svc;
bool success;
uint16_t start;
{
queue_destroy(op->pending_svcs, NULL);
queue_destroy(op->pending_chrcs, free);
- queue_destroy(op->tmp_queue, NULL);
+ queue_destroy(op->svcs, NULL);
free(op);
}
op = new0(struct discovery_op, 1);
op->pending_svcs = queue_new();
op->pending_chrcs = queue_new();
- op->tmp_queue = queue_new();
+ op->svcs = queue_new();
op->client = client;
op->complete_func = complete_func;
op->failure_func = failure_func;
/* Move on to the next service */
attr = queue_pop_head(op->pending_svcs);
if (!attr) {
- struct queue *tmp_queue;
-
- tmp_queue = op->pending_svcs;
- op->pending_svcs = op->tmp_queue;
- op->tmp_queue = tmp_queue;
-
/*
* We have processed all include definitions. Move on to
* characteristics.
*/
- attr = queue_pop_head(op->pending_svcs);
+ attr = queue_pop_head(op->svcs);
if (!attr)
goto failed;
goto failed;
}
- queue_push_tail(op->tmp_queue, attr);
+ queue_push_tail(op->svcs, attr);
op->cur_svc = attr;
if (!gatt_db_attribute_get_service_handles(attr, &start, &end))
goto failed;
}
/*
- * Store the service in the tmp queue to be reused during
+ * Store the service in the svcs queue to be reused during
* characteristics discovery later.
*/
- queue_push_tail(op->tmp_queue, attr);
+ queue_push_tail(op->svcs, attr);
op->cur_svc = attr;
if (!gatt_db_attribute_get_service_handles(attr, &start, &end)) {