Own fork of MbedSmartRestMain
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
Diff: io/DeviceMemory.cpp
- Revision:
- 70:f489ca11f254
- Parent:
- 69:237c01eb36c2
- Child:
- 93:61d44636f020
--- a/io/DeviceMemory.cpp Sat Dec 13 16:07:07 2014 +0000 +++ b/io/DeviceMemory.cpp Tue Feb 10 20:52:13 2015 +0000 @@ -31,8 +31,7 @@ if ((res < 0) || (res >= sizeof(buffer))) return false; - resetPlatformCredentials(); - return (res == _mdm.writeFile(PLATFORM_CREDENTIALS_FILE, buffer, res)); + return ((resetPlatformCredentials()) && (res == _mdm.writeFile(PLATFORM_CREDENTIALS_FILE, buffer, res))); } bool DeviceMemory::resetPlatformCredentials() @@ -57,9 +56,8 @@ size_t len; len = strlen(cfg); - - resetConfiguration(); - return (_mdm.writeFile(CONFIGURATION_FILE, cfg, len) == len); + + return ((resetConfiguration()) && (_mdm.writeFile(CONFIGURATION_FILE, cfg, len) == len)); } bool DeviceMemory::resetConfiguration()