Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
01c6034b
Commit
01c6034b
authored
2 years ago
by
Rob Swindell
Browse files
Options
Downloads
Patches
Plain Diff
More iniGetShort ->iniGetUShort fixups
Not that most of these values should ever exceed 32767, but might as well
parent
17b19e54
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/sbbs3/scfglib2.c
+8
-8
8 additions, 8 deletions
src/sbbs3/scfglib2.c
src/sbbs3/scfgsave.c
+15
-15
15 additions, 15 deletions
src/sbbs3/scfgsave.c
with
23 additions
and
23 deletions
src/sbbs3/scfglib2.c
+
8
−
8
View file @
01c6034b
...
...
@@ -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
=
iniGet
U
ShortInt
(
ini
,
ROOT_SECTION
,
"min_dspace"
,
0
);
cfg
->
max_batup
=
iniGet
U
ShortInt
(
ini
,
ROOT_SECTION
,
"max_batup"
,
0
);
cfg
->
max_batdn
=
iniGet
U
ShortInt
(
ini
,
ROOT_SECTION
,
"max_batdn"
,
0
);
cfg
->
max_userxfer
=
iniGet
U
ShortInt
(
ini
,
ROOT_SECTION
,
"max_userxfer"
,
0
);
cfg
->
cdt_up_pct
=
iniGet
U
ShortInt
(
ini
,
ROOT_SECTION
,
"upload_credit_pct"
,
0
);
cfg
->
cdt_dn_pct
=
iniGet
U
ShortInt
(
ini
,
ROOT_SECTION
,
"download_credit_pct"
,
0
);
cfg
->
leech_pct
=
iniGet
U
ShortInt
(
ini
,
ROOT_SECTION
,
"leech_pct"
,
0
);
cfg
->
leech_sec
=
iniGet
U
ShortInt
(
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
);
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/scfgsave.c
+
15
−
15
View file @
01c6034b
...
...
@@ -359,7 +359,7 @@ BOOL write_msgs_cfg(scfg_t* cfg, int backup_level)
iniSetString
(
&
section
,
name
,
"description"
,
cfg
->
grp
[
i
]
->
lname
,
NULL
);
iniSetString
(
&
section
,
name
,
"ars"
,
cfg
->
grp
[
i
]
->
arstr
,
NULL
);
iniSetString
(
&
section
,
name
,
"code_prefix"
,
cfg
->
grp
[
i
]
->
code_prefix
,
NULL
);
iniSet
ShortInt
(
&
section
,
name
,
"sort"
,
cfg
->
grp
[
i
]
->
sort
,
NULL
);
iniSet
UInteger
(
&
section
,
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
);
iniSet
ShortInt
(
ini
,
section
,
"seq_dev"
,
dir
->
seqdev
,
NULL
);
iniSet
ShortInt
(
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
);
iniSet
UInteger
(
ini
,
section
,
"seq_dev"
,
dir
->
seqdev
,
NULL
);
iniSet
UInteger
(
ini
,
section
,
"sort"
,
dir
->
sort
,
NULL
);
iniSet
U
ShortInt
(
ini
,
section
,
"max_age"
,
dir
->
maxage
,
NULL
);
iniSet
U
ShortInt
(
ini
,
section
,
"max_files"
,
dir
->
maxfiles
,
NULL
);
iniSet
U
ShortInt
(
ini
,
section
,
"upload_credit_pct"
,
dir
->
up_pct
,
NULL
);
iniSet
U
ShortInt
(
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
);
iniSet
U
ShortInt
(
&
ini
,
ROOT_SECTION
,
"max_batup"
,
cfg
->
max_batup
,
NULL
);
iniSet
U
ShortInt
(
&
ini
,
ROOT_SECTION
,
"max_batdn"
,
cfg
->
max_batdn
,
NULL
);
iniSet
U
ShortInt
(
&
ini
,
ROOT_SECTION
,
"max_userxfer"
,
cfg
->
max_userxfer
,
NULL
);
iniSet
U
ShortInt
(
&
ini
,
ROOT_SECTION
,
"upload_credit_pct"
,
cfg
->
cdt_up_pct
,
NULL
);
iniSet
U
ShortInt
(
&
ini
,
ROOT_SECTION
,
"download_credit_pct"
,
cfg
->
cdt_dn_pct
,
NULL
);
iniSet
U
ShortInt
(
&
ini
,
ROOT_SECTION
,
"leech_pct"
,
cfg
->
leech_pct
,
NULL
);
iniSet
U
ShortInt
(
&
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
);
iniSet
U
ShortInt
(
&
ini
,
ROOT_SECTION
,
"filename_maxlen"
,
cfg
->
filename_maxlen
,
NULL
);
/* Extractable File Types */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment