mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-30 16:20:24 +00:00
test/gatt-service: check input field in device_information_service_server
This commit is contained in:
parent
4899c98fd9
commit
3a672ff963
@ -85,7 +85,7 @@ static uint8_t device_information_pnp_id[7];
|
||||
static att_service_handler_t device_information_service;
|
||||
static void set_string(device_information_field_id_t field_id, const char * text){
|
||||
device_information_fields[field_id].data = (uint8_t*) text;
|
||||
device_information_fields[field_id].len = (uint8_t) strlen(text);
|
||||
device_information_fields[field_id].len = text != NULL ? (uint8_t) strlen(text) : 0;
|
||||
}
|
||||
|
||||
static uint16_t device_information_service_read_callback(hci_con_handle_t con_handle, uint16_t attribute_handle, uint16_t offset, uint8_t * buffer, uint16_t buffer_size){
|
||||
|
Loading…
x
Reference in New Issue
Block a user