mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-01 13:20:50 +00:00
battery_service_client: increase num_instances only if the instance can be stored
This commit is contained in:
parent
813fc1b96d
commit
dd57ce9fbd
@ -302,8 +302,10 @@ static void handle_gatt_client_event(uint8_t packet_type, uint16_t channel, uint
|
||||
#ifdef ENABLE_TESTING_SUPPORT
|
||||
printf("Battery Service: start handle 0x%04X, end handle 0x%04X\n", client->services[client->num_instances].start_handle, client->services[client->num_instances].end_handle);
|
||||
#endif
|
||||
client->num_instances++;
|
||||
} else {
|
||||
log_info("Found more then %d, Battery Service instances. Increase MAX_NUM_BATTERY_SERVICES to store all.", MAX_NUM_BATTERY_SERVICES);
|
||||
}
|
||||
client->num_instances++;
|
||||
break;
|
||||
|
||||
case GATT_EVENT_CHARACTERISTIC_QUERY_RESULT:
|
||||
|
Loading…
x
Reference in New Issue
Block a user