A simple .ini file interface.

Dependents:   Smart-WiFly-WebServer SignalGenerator WattEye X10Svr

Revision:
23:18b5f3d7ef14
Parent:
21:a69c8ec96cb1
Child:
24:ba5fa9548f59
--- a/IniManager.cpp	Sat Mar 31 21:07:53 2018 +0000
+++ b/IniManager.cpp	Sat Mar 31 23:36:47 2018 +0000
@@ -207,7 +207,9 @@
     INFO("ReadString from %s", iniFile);
     FILE * fp = fopen(iniFile,"rt");
     if (!fp) {
-        return RetXLate[INI_FILE_NOT_FOUND][version];
+        if (defaultString == NULL) {
+            return RetXLate[INI_FILE_NOT_FOUND][version];
+        }
     } else {
         char buf[INTERNAL_BUF_SIZE];
         bool inSection = (section == NULL) ? true : false;