Minor temporary patch to allow DFU packet callback

Fork of BLE_API by Bluetooth Low Energy

Revision:
275:4abc3126f1e1
Parent:
274:f540619754bb
Child:
276:daa42f59bdb8
--- a/services/URIBeaconConfigService.h	Wed Jan 21 09:32:53 2015 +0000
+++ b/services/URIBeaconConfigService.h	Wed Jan 21 09:32:53 2015 +0000
@@ -225,6 +225,12 @@
         memcpy(lockBitsOut, lockBits, SIZEOF_LOCK_BITS);
     }
 
+    void resetLockBits(void) {
+        lockedState = false;
+        memset(lockBits, 0, SIZEOF_LOCK_BITS);
+        storage_saveLockBits();
+    }
+
     /**
      * APIs around making lockBits persistent.
      */
@@ -404,18 +410,13 @@
      * Reset the default values.
      */
     void resetDefaults(void) {
-        lockedState      = false;
-        memset(lockBits, 0, SIZEOF_LOCK_BITS);
         uriDataLength    = 0;
         memset(uriData, 0, MAX_SIZE_URI_DATA_CHAR_VALUE);
         flags            = 0;
         memset(powerLevels, 0, sizeof(powerLevels));
         txPowerMode      = TX_POWER_MODE_LOW;
         beaconPeriod     = 0;
-
-        if (storage_haveSavedLockBits()) {
-            storage_saveLockBits();
-        }
+        resetLockBits();
 
         updateGATT();
     }