diff --git a/src/sbbs3/scfglib2.c b/src/sbbs3/scfglib2.c index ee980318984500ae97efc8749610cd8409b5696f..743bc9bee3dc31d367e3b5972c89c075e531ab72 100644 --- a/src/sbbs3/scfglib2.c +++ b/src/sbbs3/scfglib2.c @@ -61,14 +61,14 @@ BOOL read_file_cfg(scfg_t* cfg, char* error, size_t maxerrlen) ini = iniReadFile(fp); fclose(fp); - cfg->min_dspace = iniGetShortInt(ini, ROOT_SECTION, "min_dspace", 0); - cfg->max_batup = iniGetShortInt(ini, ROOT_SECTION, "max_batup", 0); - cfg->max_batdn = iniGetShortInt(ini, ROOT_SECTION, "max_batdn", 0); - cfg->max_userxfer = iniGetShortInt(ini, ROOT_SECTION, "max_userxfer", 0); - cfg->cdt_up_pct = iniGetShortInt(ini, ROOT_SECTION, "upload_credit_pct", 0); - cfg->cdt_dn_pct = iniGetShortInt(ini, ROOT_SECTION, "download_credit_pct", 0); - cfg->leech_pct = iniGetShortInt(ini, ROOT_SECTION, "leech_pct", 0); - cfg->leech_sec = iniGetShortInt(ini, ROOT_SECTION, "leech_sec", 0); + cfg->min_dspace = iniGetUShortInt(ini, ROOT_SECTION, "min_dspace", 0); + cfg->max_batup = iniGetUShortInt(ini, ROOT_SECTION, "max_batup", 0); + cfg->max_batdn = iniGetUShortInt(ini, ROOT_SECTION, "max_batdn", 0); + cfg->max_userxfer = iniGetUShortInt(ini, ROOT_SECTION, "max_userxfer", 0); + cfg->cdt_up_pct = iniGetUShortInt(ini, ROOT_SECTION, "upload_credit_pct", 0); + cfg->cdt_dn_pct = iniGetUShortInt(ini, ROOT_SECTION, "download_credit_pct", 0); + cfg->leech_pct = iniGetUShortInt(ini, ROOT_SECTION, "leech_pct", 0); + cfg->leech_sec = iniGetUShortInt(ini, ROOT_SECTION, "leech_sec", 0); cfg->file_misc = iniGetInt32(ini, ROOT_SECTION, "settings", 0); cfg->filename_maxlen = iniGetIntInRange(ini, ROOT_SECTION, "filename_maxlen", 8, SMB_FILEIDX_NAMELEN, UINT16_MAX); diff --git a/src/sbbs3/scfgsave.c b/src/sbbs3/scfgsave.c index fccfd0abe96f1013681c9a442f2b8e3d2dbaeae7..a671292c0dbdd04539c4e8b9a70f8b6f2ddaa740 100644 --- a/src/sbbs3/scfgsave.c +++ b/src/sbbs3/scfgsave.c @@ -359,7 +359,7 @@ BOOL write_msgs_cfg(scfg_t* cfg, int backup_level) iniSetString(§ion, name, "description", cfg->grp[i]->lname, NULL); iniSetString(§ion, name, "ars", cfg->grp[i]->arstr, NULL); iniSetString(§ion, name, "code_prefix", cfg->grp[i]->code_prefix, NULL); - iniSetShortInt(§ion, name, "sort", cfg->grp[i]->sort, NULL); + iniSetUInteger(§ion, name, "sort", cfg->grp[i]->sort, NULL); strListMerge(&ini, section); free(section); } @@ -590,12 +590,12 @@ static void write_dir_defaults_cfg(str_list_t* ini, const char* section, dir_t* iniSetString(ini, section, "upload_sem", dir->upload_sem, NULL); iniSetString(ini, section, "extensions", dir->exts, NULL); iniSetHexInt(ini, section, "settings", dir->misc, NULL); - iniSetShortInt(ini, section, "seq_dev", dir->seqdev, NULL); - iniSetShortInt(ini, section, "sort", dir->sort, NULL); - iniSetShortInt(ini, section, "max_age", dir->maxage, NULL); - iniSetShortInt(ini, section, "max_files", dir->maxfiles, NULL); - iniSetShortInt(ini, section, "upload_credit_pct", dir->up_pct, NULL); - iniSetShortInt(ini, section, "download_credit_pct", dir->dn_pct, NULL); + iniSetUInteger(ini, section, "seq_dev", dir->seqdev, NULL); + iniSetUInteger(ini, section, "sort", dir->sort, NULL); + iniSetUShortInt(ini, section, "max_age", dir->maxage, NULL); + iniSetUShortInt(ini, section, "max_files", dir->maxfiles, NULL); + iniSetUShortInt(ini, section, "upload_credit_pct", dir->up_pct, NULL); + iniSetUShortInt(ini, section, "download_credit_pct", dir->dn_pct, NULL); } /****************************************************************************/ @@ -615,15 +615,15 @@ BOOL write_file_cfg(scfg_t* cfg, int backup_level) str_list_t ini = strListInit(); iniSetUShortInt(&ini, ROOT_SECTION, "min_dspace", cfg->min_dspace, NULL); - iniSetShortInt(&ini, ROOT_SECTION, "max_batup", cfg->max_batup, NULL); - iniSetShortInt(&ini, ROOT_SECTION, "max_batdn", cfg->max_batdn, NULL); - iniSetShortInt(&ini, ROOT_SECTION, "max_userxfer" ,cfg->max_userxfer, NULL); - iniSetShortInt(&ini, ROOT_SECTION, "upload_credit_pct", cfg->cdt_up_pct, NULL); - iniSetShortInt(&ini, ROOT_SECTION, "download_credit_pct", cfg->cdt_dn_pct, NULL); - iniSetShortInt(&ini, ROOT_SECTION, "leech_pct", cfg->leech_pct, NULL); - iniSetShortInt(&ini, ROOT_SECTION, "leech_sec", cfg->leech_sec, NULL); + iniSetUShortInt(&ini, ROOT_SECTION, "max_batup", cfg->max_batup, NULL); + iniSetUShortInt(&ini, ROOT_SECTION, "max_batdn", cfg->max_batdn, NULL); + iniSetUShortInt(&ini, ROOT_SECTION, "max_userxfer" ,cfg->max_userxfer, NULL); + iniSetUShortInt(&ini, ROOT_SECTION, "upload_credit_pct", cfg->cdt_up_pct, NULL); + iniSetUShortInt(&ini, ROOT_SECTION, "download_credit_pct", cfg->cdt_dn_pct, NULL); + iniSetUShortInt(&ini, ROOT_SECTION, "leech_pct", cfg->leech_pct, NULL); + iniSetUShortInt(&ini, ROOT_SECTION, "leech_sec", cfg->leech_sec, NULL); iniSetHexInt(&ini, ROOT_SECTION, "settings", cfg->file_misc, NULL); - iniSetShortInt(&ini, ROOT_SECTION, "filename_maxlen", cfg->filename_maxlen, NULL); + iniSetUShortInt(&ini, ROOT_SECTION, "filename_maxlen", cfg->filename_maxlen, NULL); /* Extractable File Types */