# HG changeset patch # User Medo # Date 1344285125 -7200 # Node ID a9ab8067a2d16b4a5b75caa96710607437046eb8 # Parent 859ab685985463e6629171645014a6e5bc0ed4d9 frontlib: fixed ini writing failing because of an inverted condition diff -r 859ab6859854 -r a9ab8067a2d1 project_files/frontlib/util/inihelper.c --- a/project_files/frontlib/util/inihelper.c Mon Aug 06 22:31:02 2012 +0200 +++ b/project_files/frontlib/util/inihelper.c Mon Aug 06 22:32:05 2012 +0200 @@ -123,6 +123,7 @@ } if(!log_badargs_if2(ini==NULL, section==NULL)) { if(!iniparser_find_entry(ini->inidict, section)) { + flib_log_d("Ini section %s not found", section); result = INI_ERROR_NOTFOUND; } else { ini->currentSection = flib_strdupnull(section); @@ -143,6 +144,7 @@ result = flib_ini_enter_section(ini, section); if(result == INI_ERROR_NOTFOUND) { if(iniparser_set(ini->inidict, section, NULL)) { + flib_log_e("Error creating ini section %s", section); result = INI_ERROR_OTHER; } else { result = flib_ini_enter_section(ini, section); @@ -256,10 +258,13 @@ int flib_ini_set_str(flib_ini *ini, const char *key, const char *value) { int result = INI_ERROR_OTHER; - if(log_badargs_if4(ini==NULL, ini->currentSection==NULL, key==NULL, value==NULL)) { + if(!log_badargs_if4(ini==NULL, ini->currentSection==NULL, key==NULL, value==NULL)) { char *dictKey = createDictKey(ini->currentSection, key); if(dictKey) { result = iniparser_set(ini->inidict, dictKey, value); + if(result) { + flib_log_e("Error setting ini entry %s to %s", dictKey, value); + } } free(dictKey); }