diff options
author | Chris Manton <cmanton@google.com> | 2014-05-06 10:35:42 -0700 |
---|---|---|
committer | Andre Eisenbach <eisenbach@google.com> | 2015-03-16 16:51:29 -0700 |
commit | fe7216ca12f91baae733e7c93063db73121af308 (patch) | |
tree | 03a66f188e1fd2e8daa48d5be04220b80422d7bf /stack/gatt/gatt_utils.c | |
parent | 284440f0c9f9fe15b162e37ef2bf6af439407447 (diff) | |
download | android_system_bt-fe7216ca12f91baae733e7c93063db73121af308.tar.gz android_system_bt-fe7216ca12f91baae733e7c93063db73121af308.tar.bz2 android_system_bt-fe7216ca12f91baae733e7c93063db73121af308.zip |
Enforce GKI API buffer usage
Also add another API GKI_queue_length(BUFFER_Q *)
Diffstat (limited to 'stack/gatt/gatt_utils.c')
-rw-r--r-- | stack/gatt/gatt_utils.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/stack/gatt/gatt_utils.c b/stack/gatt/gatt_utils.c index 0e841a92c..f0658ea2a 100644 --- a/stack/gatt/gatt_utils.c +++ b/stack/gatt/gatt_utils.c @@ -93,7 +93,7 @@ void gatt_free_pending_ind(tGATT_TCB *p_tcb) { GATT_TRACE_DEBUG("gatt_free_pending_ind"); /* release all queued indications */ - while (p_tcb->pending_ind_q.p_first) + while (!GKI_queue_is_empty(&p_tcb->pending_ind_q)) GKI_freebuf (GKI_dequeue (&p_tcb->pending_ind_q)); } @@ -110,7 +110,7 @@ void gatt_free_pending_enc_queue(tGATT_TCB *p_tcb) { GATT_TRACE_DEBUG("gatt_free_pending_enc_queue"); /* release all queued indications */ - while (p_tcb->pending_enc_clcb.p_first) + while (!GKI_queue_is_empty(&p_tcb->pending_enc_clcb)) GKI_freebuf (GKI_dequeue (&p_tcb->pending_enc_clcb)); } @@ -373,7 +373,7 @@ void gatt_free_hdl_buffer(tGATT_HDL_LIST_ELEM *p) if (p) { - while (p->svc_db.svc_buffer.p_first) + while (!GKI_queue_is_empty(&p->svc_db.svc_buffer)) GKI_freebuf (GKI_dequeue (&p->svc_db.svc_buffer)); memset(p, 0, sizeof(tGATT_HDL_LIST_ELEM)); } @@ -397,7 +397,7 @@ void gatt_free_srvc_db_buffer_app_id(tBT_UUID *p_app_id) { if (memcmp(p_app_id, &p_elem->asgn_range.app_uuid128, sizeof(tBT_UUID)) == 0) { - while (p_elem->svc_db.svc_buffer.p_first) + while (!GKI_queue_is_empty(&p_elem->svc_db.svc_buffer)) GKI_freebuf (GKI_dequeue (&p_elem->svc_db.svc_buffer)); p_elem->svc_db.mem_free = 0; @@ -1363,7 +1363,7 @@ UINT8 gatt_sr_alloc_rcb(tGATT_HDL_LIST_ELEM *p_list ) p_sreg->e_hdl = p_list->asgn_range.e_handle; p_sreg->p_db = &p_list->svc_db; - GATT_TRACE_DEBUG ("total GKI buffer in db [%d]",p_sreg->p_db->svc_buffer.count); + GATT_TRACE_DEBUG ("total GKI buffer in db [%d]",GKI_queue_length(&p_sreg->p_db->svc_buffer)); break; } } |