A simple .ini file interface.
Dependents: Smart-WiFly-WebServer SignalGenerator WattEye X10Svr
Revision 2:c63a794c1fee, committed 2013-09-05
- Comitter:
- WiredHome
- Date:
- Thu Sep 05 22:50:39 2013 +0000
- Parent:
- 1:1e2ee9bbee40
- Child:
- 3:64fcaf06b012
- Commit message:
- Improved diagnostics capability.
Changed in this revision
IniManager.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/IniManager.cpp Sun Sep 01 19:52:53 2013 +0000 +++ b/IniManager.cpp Thu Sep 05 22:50:39 2013 +0000 @@ -107,10 +107,11 @@ FILE * repair = fopen(newFile, "rt"); if (repair) { + int i; + // helps recover if the system crashed before it could swap in the new file INFO("*** repairing\r\n"); fclose(repair); - int i; i = remove(bakFile); // remove an old .bak INFO("remove(%s) returned %d\r\n", bakFile, i); i = Rename(iniFile, bakFile); // move the existing .ini to .bak