don't memset(0) the discovered Characteristics or Services in reset*(); that destroys the pointer to virtual tables

This commit is contained in:
Rohit Grover 2015-06-02 08:56:47 +01:00
parent 771213d522
commit 4730615cb2

View file

@ -86,13 +86,11 @@ private:
void resetDiscoveredServices(void) {
numServices = 0;
serviceIndex = 0;
memset(services, 0, sizeof(DiscoveredService) * BLE_DB_DISCOVERY_MAX_SRV);
}
void resetDiscoveredCharacteristics(void) {
numCharacteristics = 0;
characteristicIndex = 0;
memset(characteristics, 0, sizeof(DiscoveredCharacteristic) * BLE_DB_DISCOVERY_MAX_CHAR_PER_SRV);
}
public: