test/mock: fix handle when service is empty

This commit is contained in:
Milanka Ringwald 2021-06-09 10:48:09 +02:00
parent 5b92fca970
commit 6ad61799b1

View File

@ -99,7 +99,7 @@ mock_gatt_client_service_t * mock_gatt_client_add_primary_service_uuid16(uint16_
memset(mock_gatt_client_last_service, 0, sizeof(mock_gatt_client_service_t));
mock_gatt_client_last_service->uuid16 = service_uuid;
mock_gatt_client_last_service->start_group_handle = mock_gatt_client_att_handle_generator++;
mock_gatt_client_last_service->end_group_handle = 0xffff;
mock_gatt_client_last_service->end_group_handle = mock_gatt_client_last_service->start_group_handle;
btstack_linked_list_add_tail(&mock_gatt_client_services, (btstack_linked_item_t*)mock_gatt_client_last_service);
mock_gatt_client_last_characteristic = NULL;
return mock_gatt_client_last_service;