Skip to content
Snippets Groups Projects
Commit 20e2364f authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Build the sub's internal code (from group prefix and sub suffix) when saving

... QWKnet hub sub-boards

The internal code is not "prepped" when read by SCFG, so the code is actually
blank (empty string) when saved in SCFG and is thus not useable for writing
the value to .ini, as in this case.

This fixes issue #441 (for the new_config_format branch) as reported by Nelgin
parent d37f34ba
No related branches found
No related tags found
No related merge requests found
......@@ -489,7 +489,11 @@ BOOL write_msgs_cfg(scfg_t* cfg, int backup_level)
continue;
SAFEPRINTF2(name, "qhubsub:%s:%u", cfg->qhub[i]->id, cfg->qhub[i]->conf[j]);
str_list_t section = strListInit();
iniSetString(&section, name, "sub", cfg->sub[subnum]->code, NULL);
char code[LEN_EXTCODE + 1];
SAFEPRINTF2(code,"%s%s"
,cfg->grp[cfg->sub[subnum]->grp]->code_prefix
,cfg->sub[subnum]->code_suffix);
iniSetString(&section, name, "sub", code, NULL);
iniSetHexInt(&section, name, "settings", cfg->qhub[i]->mode[j], NULL);
strListMerge(&ini, section);
free(section);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment