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
dd534b7e
Commit
dd534b7e
authored
19 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Log the actual number of bytes received along with the CPS on file completion.
parent
b08fdf33
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/syncterm/term.c
+16
-3
16 additions, 3 deletions
src/syncterm/term.c
with
16 additions
and
3 deletions
src/syncterm/term.c
+
16
−
3
View file @
dd534b7e
...
...
@@ -484,12 +484,17 @@ void zmodem_receive(void)
char
str
[
MAX_PATH
*
2
];
FILE
*
fp
;
long
l
;
BOOL
skip
;
ulong
b
;
ulong
crc
;
ulong
rcrc
;
ulong
bytes
;
ulong
kbytes
;
BOOL
skip
;
ulong
start_bytes
;
time_t
start_time
;
time_t
ftime
;
time_t
t
;
unsigned
cps
;
unsigned
timeout
;
unsigned
errors
=
0
;
zmodem_t
zm
;
...
...
@@ -556,6 +561,8 @@ void zmodem_receive(void)
lprintf
(
LOG_ERR
,
"Error %d opening/creating/appending %s"
,
errno
,
fpath
);
break
;
}
start_bytes
=
filelength
(
fileno
(
fp
));
start_time
=
time
(
NULL
);
skip
=
FALSE
;
errors
=
zmodem_recv_file_data
(
&
zm
,
fp
,
flength
(
fpath
),
bytes
,
/* start time */
0
);
...
...
@@ -576,8 +583,14 @@ void zmodem_receive(void)
if
(
l
!=
(
long
)
bytes
)
{
lprintf
(
LOG_WARNING
,
"Incomplete download (%ld bytes received, expected %lu)"
,
l
,
bytes
);
}
else
lprintf
(
LOG_INFO
,
"Received %lu bytes successfully"
,
bytes
);
}
else
{
if
((
t
=
time
(
NULL
)
-
start_time
)
<=
0
)
t
=
1
;
b
=
l
-
start_bytes
;
if
((
cps
=
b
/
t
)
==
0
)
cps
=
1
;
lprintf
(
LOG_INFO
,
"Received %lu bytes successfully (%u CPS)"
,
b
,
cps
);
}
if
(
ftime
)
setfdate
(
fpath
,
ftime
);
}
...
...
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