Lines Matching refs:p_attr
41 static BOOLEAN deallocate_attr_in_db(tGATT_SVC_DB *p_db, void *p_attr);
116 static tGATT_STATUS gatts_check_attr_readability(tGATT_ATTR16 *p_attr, in gatts_check_attr_readability() argument
123 tGATT_PERM perm = p_attr->permission; in gatts_check_attr_readability()
165 switch (p_attr->uuid) in gatts_check_attr_readability()
204 static tGATT_STATUS read_attr_value (void *p_attr, in read_attr_value() argument
217 tGATT_ATTR16 *p_attr16 = (tGATT_ATTR16 *)p_attr; in read_attr_value()
226 …status = gatts_check_attr_readability((tGATT_ATTR16 *)p_attr, offset, read_long, sec_flag, key_siz… in read_attr_value()
329 tGATT_ATTR16 *p_attr; in gatts_db_read_attr_value_by_type() local
336 p_attr = (tGATT_ATTR16 *)p_db->p_attr_list; in gatts_db_read_attr_value_by_type()
338 while (p_attr && p_attr->handle <= e_handle) in gatts_db_read_attr_value_by_type()
340 if (p_attr->uuid_type == GATT_ATTR_UUID_TYPE_16) in gatts_db_read_attr_value_by_type()
343 attr_uuid.uu.uuid16 = p_attr->uuid; in gatts_db_read_attr_value_by_type()
348 memcpy(attr_uuid.uu.uuid128, ((tGATT_ATTR128 *)p_attr)->uuid, LEN_UUID_128); in gatts_db_read_attr_value_by_type()
351 if (p_attr->handle >= s_handle && gatt_uuid_compare(type, attr_uuid)) in gatts_db_read_attr_value_by_type()
359 UINT16_TO_STREAM (p, p_attr->handle); in gatts_db_read_attr_value_by_type()
361 …status = read_attr_value ((void *)p_attr, 0, &p, FALSE, (UINT16)(*p_len -2), &len, sec_flag, key_s… in gatts_db_read_attr_value_by_type()
365 … status = gatts_send_app_read_request(p_tcb, op_code, p_attr->handle, 0, trans_id); in gatts_db_read_attr_value_by_type()
389 *p_cur_handle = p_attr->handle; in gatts_db_read_attr_value_by_type()
393 p_attr = (tGATT_ATTR16 *)p_attr->p_next; in gatts_db_read_attr_value_by_type()
415 tGATT_ATTR16 *p_attr; in gatts_add_included_service() local
426 …if ((p_attr = (tGATT_ATTR16 *) allocate_attr_in_db(p_db, GATT_UUID_INCLUDE_SERVICE, NULL, GATT_PER… in gatts_add_included_service()
428 if (copy_extra_byte_in_db(p_db, (void **)&p_attr->p_value, sizeof(tGATT_INCL_SRVC))) in gatts_add_included_service()
430 p_attr->p_value->incl_handle.s_handle = s_handle; in gatts_add_included_service()
431 p_attr->p_value->incl_handle.e_handle = e_handle; in gatts_add_included_service()
432 memcpy(&p_attr->p_value->incl_handle.service_type, &service, sizeof(tBT_UUID)); in gatts_add_included_service()
434 return p_attr->handle; in gatts_add_included_service()
438 deallocate_attr_in_db(p_db, p_attr); in gatts_add_included_service()
611 tGATT_ATTR16 *p_attr; in gatts_read_attr_value_by_handle() local
616 p_attr = (tGATT_ATTR16 *)p_db->p_attr_list; in gatts_read_attr_value_by_handle()
618 while (p_attr && handle >= p_attr->handle) in gatts_read_attr_value_by_handle()
620 if (p_attr->handle == handle) in gatts_read_attr_value_by_handle()
622 status = read_attr_value (p_attr, offset, &pp, in gatts_read_attr_value_by_handle()
628 … status = gatts_send_app_read_request(p_tcb, op_code, p_attr->handle, offset, trans_id); in gatts_read_attr_value_by_handle()
632 p_attr = (tGATT_ATTR16 *)p_attr->p_next; in gatts_read_attr_value_by_handle()
665 tGATT_ATTR16 *p_attr; in gatts_read_attr_perm_check() local
669 p_attr = (tGATT_ATTR16 *)p_db->p_attr_list; in gatts_read_attr_perm_check()
671 while (p_attr && handle >= p_attr->handle) in gatts_read_attr_perm_check()
673 if (p_attr->handle == handle) in gatts_read_attr_perm_check()
675 status = gatts_check_attr_readability (p_attr, 0, in gatts_read_attr_perm_check()
680 p_attr = (tGATT_ATTR16 *) p_attr->p_next; in gatts_read_attr_perm_check()
709 tGATT_ATTR16 *p_attr; in gatts_write_attr_perm_check() local
719 p_attr = (tGATT_ATTR16 *) p_db->p_attr_list; in gatts_write_attr_perm_check()
721 while (p_attr != NULL) in gatts_write_attr_perm_check()
723 if (p_attr->handle == handle) in gatts_write_attr_perm_check()
725 perm = p_attr->permission; in gatts_write_attr_perm_check()
732 p_attr->permission, in gatts_write_attr_perm_check()
799 if(p_attr->uuid_type == GATT_ATTR_UUID_TYPE_16) in gatts_write_attr_perm_check()
801 switch (p_attr->uuid) in gatts_write_attr_perm_check()
822 else if (p_attr->uuid_type == GATT_ATTR_UUID_TYPE_128) in gatts_write_attr_perm_check()
837 else if ( (p_attr->uuid_type == GATT_ATTR_UUID_TYPE_16) && in gatts_write_attr_perm_check()
838 (p_attr->uuid == GATT_UUID_CHAR_CLIENT_CONFIG || in gatts_write_attr_perm_check()
839 p_attr->uuid == GATT_UUID_CHAR_SRVR_CONFIG) ) in gatts_write_attr_perm_check()
861 p_attr = (tGATT_ATTR16 *)p_attr->p_next; in gatts_write_attr_perm_check()
974 static BOOLEAN deallocate_attr_in_db(tGATT_SVC_DB *p_db, void *p_attr) in deallocate_attr_in_db() argument
988 if (p_next == p_attr) in deallocate_attr_in_db()
994 if (p_cur == p_attr && p_cur == p_db->p_attr_list) in deallocate_attr_in_db()
1133 tGATT_ATTR16 *p_attr; in gatts_db_add_service_declaration() local
1139 …if ((p_attr = (tGATT_ATTR16 *)(allocate_attr_in_db(p_db, service_type, NULL, GATT_PERM_READ))) != … in gatts_db_add_service_declaration()
1141 if (copy_extra_byte_in_db (p_db, (void **)&p_attr->p_value, sizeof(tBT_UUID))) in gatts_db_add_service_declaration()
1143 memcpy (&p_attr->p_value->uuid, &service, sizeof(tBT_UUID)); in gatts_db_add_service_declaration()