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
38c5cf20
Commit
38c5cf20
authored
2 years ago
by
Rob Swindell
Browse files
Options
Downloads
Patches
Plain Diff
Allow minimum disk space to be any size (not limited to 65535K)
parent
ef1381e7
No related branches found
No related tags found
1 merge request
!463
MRC mods by Codefenix (2024-10-20)
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/sbbs3/scfg/scfgxfr1.c
+8
-7
8 additions, 7 deletions
src/sbbs3/scfg/scfgxfr1.c
src/sbbs3/scfgdefs.h
+1
-1
1 addition, 1 deletion
src/sbbs3/scfgdefs.h
src/sbbs3/scfglib2.c
+1
-1
1 addition, 1 deletion
src/sbbs3/scfglib2.c
src/sbbs3/scfgsave.c
+1
-1
1 addition, 1 deletion
src/sbbs3/scfgsave.c
with
11 additions
and
10 deletions
src/sbbs3/scfg/scfgxfr1.c
+
8
−
7
View file @
38c5cf20
...
...
@@ -81,8 +81,8 @@ void xfer_opts()
while
(
1
)
{
i
=
0
;
sprintf
(
opt
[
i
++
],
"%-33.33s%
uk
"
,
"Min Bytes Free Disk Space"
,
cfg
.
min_dspace
);
sprintf
(
opt
[
i
++
],
"%-33.33s%
s
"
,
"Min Bytes Free Disk Space"
,
byte_count_to_str
(
cfg
.
min_dspace
,
str
,
sizeof
(
str
))
);
sprintf
(
opt
[
i
++
],
"%-33.33s%u"
,
"Max Files in Batch UL Queue"
,
cfg
.
max_batup
);
sprintf
(
opt
[
i
++
],
"%-33.33s%u"
,
"Max Files in Batch DL Queue"
...
...
@@ -133,15 +133,16 @@ void xfer_opts()
return
;
case
__COUNTER__
:
uifc
.
helpbuf
=
"`Minimum
Kilob
yte
s
Free Disk Space to Allow Uploads:`
\n
"
"`Minimum
B
yte Free Disk Space to Allow Uploads:`
\n
"
"
\n
"
"This is the minimum free space in a file directory to allow user
\n
"
"uploads.
\n
"
;
uifc
.
input
(
WIN_MID
,
0
,
0
,
"Minimum Kilobytes Free Disk Space to Allow Uploads"
,
ultoa
(
cfg
.
min_dspace
,
tmp
,
10
),
5
,
K_EDIT
|
K_NUMBER
);
cfg
.
min_dspace
=
atoi
(
tmp
);
byte_count_to_str
(
cfg
.
min_dspace
,
str
,
sizeof
(
str
));
if
(
uifc
.
input
(
WIN_MID
,
0
,
0
,
"Minimum Bytes Free Disk Space to Allow Uploads"
,
str
,
10
,
K_UPPER
|
K_EDIT
)
>
0
)
cfg
.
min_dspace
=
parse_byte_count
(
str
,
1
);
break
;
case
__COUNTER__
:
uifc
.
helpbuf
=
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/scfgdefs.h
+
1
−
1
View file @
38c5cf20
...
...
@@ -576,7 +576,7 @@ typedef struct
uint32_t
expired_flags4
;
/* Flags from set #4 to remove when expired */
uint32_t
expired_exempt
;
/* Exemptions to remove when expired */
uint32_t
expired_rest
;
/* Restrictions to add when expired */
u
int
1
6_t
min_dspace
;
/* Minimum amount of free space for uploads
(in kilobytes)
*/
int6
4
_t
min_dspace
;
/* Minimum amount of free space for uploads */
uint16_t
max_batup
;
/* Max number of files in upload queue */
uint16_t
max_batdn
;
/* Max number of files in download queue */
uint16_t
max_userxfer
;
/* Max dest. users of user to user xfer */
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/scfglib2.c
+
1
−
1
View file @
38c5cf20
...
...
@@ -61,7 +61,7 @@ BOOL read_file_cfg(scfg_t* cfg, char* error, size_t maxerrlen)
ini
=
iniReadFile
(
fp
);
fclose
(
fp
);
cfg
->
min_dspace
=
iniGet
UShortInt
(
ini
,
ROOT_SECTION
,
"min_dspace"
,
0
);
cfg
->
min_dspace
=
iniGet
Bytes
(
ini
,
ROOT_SECTION
,
"min_dspace"
,
1
,
100
*
1024
*
1024
);
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
);
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/scfgsave.c
+
1
−
1
View file @
38c5cf20
...
...
@@ -614,7 +614,7 @@ BOOL write_file_cfg(scfg_t* cfg, int backup_level)
backup
(
inipath
,
backup_level
,
TRUE
);
str_list_t
ini
=
strListInit
();
iniSet
UShortInt
(
&
ini
,
ROOT_SECTION
,
"min_dspace"
,
cfg
->
min_dspace
,
NULL
);
iniSet
Bytes
(
&
ini
,
ROOT_SECTION
,
"min_dspace"
,
1
,
cfg
->
min_dspace
,
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
);
...
...
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