better initialization for discoveryStatus from launchServiceDiscovery()

This commit is contained in:
Rohit Grover 2015-04-30 10:05:58 +01:00
parent 2007fdac82
commit 507e6bc8ea

View file

@ -61,7 +61,10 @@ static ble_db_discovery_t discoveryStatus;
void launchServiceDiscovery(Gap::Handle_t connectionHandle)
{
// printf("connectionHandle %u\r\n", connectionHandle);
discoveryStatus.connHandle = connectionHandle;
discoveryStatus.srvCount = 0;
discoveryStatus.currSrvInd = 0;
discoveryStatus.serviceDiscoveryInProgress = true;
discoveryStatus.characteristicDiscoveryInProgress = false;
printf("launch service discovery returned %u\r\n", sd_ble_gattc_primary_services_discover(connectionHandle, SRV_DISC_START_HANDLE, NULL));