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
c19539c0
Commit
c19539c0
authored
19 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Changed parsing of DSZLOG (protocol.log) to account for long filenames and
filenames with spaces in them. <sigh>
parent
bfc3ab54
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sbbs3/download.cpp
+27
-18
27 additions, 18 deletions
src/sbbs3/download.cpp
with
27 additions
and
18 deletions
src/sbbs3/download.cpp
+
27
−
18
View file @
c19539c0
...
...
@@ -316,12 +316,6 @@ bool sbbs_t::checkdszlog(file_t* f)
char
*
rname
;
char
code
;
ulong
bytes
;
ulong
dte
;
ulong
cps
;
ulong
errors
;
ulong
flows
;
ulong
block_size
;
long
serial_no
;
FILE
*
fp
;
bool
success
=
false
;
...
...
@@ -331,24 +325,39 @@ bool sbbs_t::checkdszlog(file_t* f)
unpadfname
(
f
->
name
,
fname
);
/* Increase real path is different (long filename?) */
getfilepath
(
&
cfg
,
f
,
rpath
);
fexistcase
(
rpath
);
/* incase of long filename */
rname
=
getfname
(
rpath
);
while
(
!
ferror
(
fp
))
{
if
(
!
fgets
(
str
,
sizeof
(
str
),
fp
))
break
;
sscanf
(
str
,
"%c %lu %lu bps %lu cps %lu errors %lu %lu %s %ld"
,
&
code
,
&
bytes
,
&
dte
,
&
cps
,
&
errors
,
&
flows
,
&
block_size
,
path
,
&
serial_no
);
p
=
getfname
(
path
);
/* DSZ stores fullpath, BiModem doesn't */
if
((
p
=
strrchr
(
str
,
' '
))
!=
NULL
)
*
p
=
0
;
/* we don't care about no stinking serial number */
p
=
str
;
code
=*
p
;
FIND_WHITESPACE
(
p
);
// Skip code
SKIP_WHITESPACE
(
p
);
bytes
=
strtoul
(
p
,
NULL
,
10
);
FIND_WHITESPACE
(
p
);
// Skip bytes
SKIP_WHITESPACE
(
p
);
FIND_WHITESPACE
(
p
);
// Skip DTE rate
SKIP_WHITESPACE
(
p
);
FIND_WHITESPACE
(
p
);
// Skip "bps" rate
SKIP_WHITESPACE
(
p
);
FIND_WHITESPACE
(
p
);
// Skip CPS
SKIP_WHITESPACE
(
p
);
FIND_WHITESPACE
(
p
);
// Skip "cps"
SKIP_WHITESPACE
(
p
);
FIND_WHITESPACE
(
p
);
// Skip errors
SKIP_WHITESPACE
(
p
);
FIND_WHITESPACE
(
p
);
// Skip "errors"
SKIP_WHITESPACE
(
p
);
FIND_WHITESPACE
(
p
);
// Skip flows
SKIP_WHITESPACE
(
p
);
FIND_WHITESPACE
(
p
);
// Skip block size
SKIP_WHITESPACE
(
p
);
p
=
getfname
(
p
);
/* DSZ stores fullpath, BiModem doesn't */
if
(
stricmp
(
p
,
fname
)
==
0
||
stricmp
(
p
,
rname
)
==
0
)
{
/* E for Error or L for Lost Carrier or s for Skipped */
/* or only sent 0 bytes! */
...
...
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