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
c317d9ce
Commit
c317d9ce
authored
15 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Changed data_waiting() callback to use timeout in seconds rather than
milliseconds.
parent
8dccc604
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/zmodem.c
+6
-6
6 additions, 6 deletions
src/sbbs3/zmodem.c
src/sbbs3/zmodem.h
+3
-3
3 additions, 3 deletions
src/sbbs3/zmodem.h
with
9 additions
and
9 deletions
src/sbbs3/zmodem.c
+
6
−
6
View file @
c317d9ce
...
...
@@ -1329,7 +1329,7 @@ BOOL zmodem_get_crc(zmodem_t* zm, int32_t length, uint32_t* crc)
zmodem_recv_purge
(
zm
);
zmodem_send_pos_header
(
zm
,
ZCRC
,
length
,
TRUE
);
if
(
!
zmodem_data_waiting
(
zm
,
zm
->
crc_timeout
*
1000
))
{
if
(
!
zmodem_data_waiting
(
zm
,
zm
->
crc_timeout
))
{
lprintf
(
zm
,
LOG_ERR
,
"Timeout waiting for response (%u seconds)"
,
zm
->
crc_timeout
);
return
(
FALSE
);
}
...
...
@@ -1375,7 +1375,7 @@ int zmodem_get_zrinit(zmodem_t* zm)
zmodem_send_raw
(
zm
,
'\r'
);
zmodem_send_hex_header
(
zm
,
zrqinit_header
);
if
(
!
zmodem_data_waiting
(
zm
,
zm
->
init_timeout
*
1000
))
if
(
!
zmodem_data_waiting
(
zm
,
zm
->
init_timeout
))
return
(
TIMEOUT
);
return
zmodem_recv_header
(
zm
);
}
...
...
@@ -1568,7 +1568,7 @@ int zmodem_send_from(zmodem_t* zm, FILE* fp, uint64_t pos, uint64_t* sent)
* check out that header
*/
while
(
zmodem_data_waiting
(
zm
,
zm
->
consecutive_errors
?
1
000
:
0
)
while
(
zmodem_data_waiting
(
zm
,
zm
->
consecutive_errors
?
1
:
0
)
&&
!
is_cancelled
(
zm
)
&&
is_connected
(
zm
))
{
int
rx_type
;
int
c
;
...
...
@@ -2251,11 +2251,11 @@ char* zmodem_ver(char *buf)
void
zmodem_init
(
zmodem_t
*
zm
,
void
*
cbdata
,
int
(
*
lputs
)(
void
*
,
int
level
,
const
char
*
str
)
,
void
(
*
progress
)(
void
*
unused
,
int64_t
)
,
int
(
*
send_byte
)(
void
*
,
uchar
ch
,
unsigned
timeout
)
,
int
(
*
recv_byte
)(
void
*
,
unsigned
timeout
)
,
int
(
*
send_byte
)(
void
*
,
uchar
ch
,
unsigned
timeout
/* seconds */
)
,
int
(
*
recv_byte
)(
void
*
,
unsigned
timeout
/* seconds */
)
,
BOOL
(
*
is_connected
)(
void
*
)
,
BOOL
(
*
is_cancelled
)(
void
*
)
,
BOOL
(
*
data_waiting
)(
void
*
,
unsigned
timeout
)
,
BOOL
(
*
data_waiting
)(
void
*
,
unsigned
timeout
/* seconds */
)
,
void
(
*
flush
)(
void
*
))
{
memset
(
zm
,
0
,
sizeof
(
zmodem_t
));
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/zmodem.h
+
3
−
3
View file @
c317d9ce
...
...
@@ -278,12 +278,12 @@ typedef struct {
/* error C2520: conversion from unsigned __int64 to double not implemented, use signed __int64 */
void
*
cbdata
;
int
(
*
lputs
)(
void
*
,
int
level
,
const
char
*
str
);
int
(
*
send_byte
)(
void
*
,
BYTE
ch
,
unsigned
timeout
);
int
(
*
recv_byte
)(
void
*
,
unsigned
timeout
);
int
(
*
send_byte
)(
void
*
,
BYTE
ch
,
unsigned
timeout
/* seconds */
);
int
(
*
recv_byte
)(
void
*
,
unsigned
timeout
/* seconds */
);
void
(
*
progress
)(
void
*
,
int64_t
current_pos
);
BOOL
(
*
is_connected
)(
void
*
);
BOOL
(
*
is_cancelled
)(
void
*
);
BOOL
(
*
data_waiting
)(
void
*
,
unsigned
timeout
);
BOOL
(
*
data_waiting
)(
void
*
,
unsigned
timeout
/* seconds */
);
BOOL
(
*
duplicate_filename
)(
void
*
,
void
*
zm
);
void
(
*
flush
)(
void
*
);
...
...
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