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
bd4612ea
Commit
bd4612ea
authored
4 years ago
by
Deucе
Browse files
Options
Downloads
Patches
Plain Diff
Suspend RIP processing for file transfers
parent
1a402cbf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/syncterm/ripper.c
+18
-0
18 additions, 0 deletions
src/syncterm/ripper.c
src/syncterm/ripper.h
+1
-0
1 addition, 0 deletions
src/syncterm/ripper.h
src/syncterm/term.c
+6
-0
6 additions, 0 deletions
src/syncterm/term.c
with
25 additions
and
0 deletions
src/syncterm/ripper.c
+
18
−
0
View file @
bd4612ea
...
...
@@ -97,6 +97,7 @@ static uint8_t *ripbuf = NULL;
static size_t ripbuf_size = 0;
static size_t ripbuf_pos = 0;
static size_t ripbufpos = 0;
static bool rip_suspended = false;
static struct mouse_field *rip_pressed = NULL;
...
...
@@ -13157,6 +13158,23 @@ init_rip(int enabled)
}
}
void
suspend_rip(bool suspend)
{
if (suspend) {
if (rip.enabled) {
rip_suspended = true;
rip.enabled = false;
}
}
else {
if (rip_suspended) {
rip_suspended = false;
rip.enabled = true;
}
}
}
int
rip_kbhit(void)
{
...
...
This diff is collapsed.
Click to expand it.
src/syncterm/ripper.h
+
1
−
0
View file @
bd4612ea
...
...
@@ -5,5 +5,6 @@ void init_rip(int enabled);
size_t
parse_rip
(
BYTE
*
buf
,
unsigned
blen
,
unsigned
maxlen
);
int
rip_getch
(
void
);
int
rip_kbhit
(
void
);
void
suspend_rip
(
bool
suspend
);
#endif
This diff is collapsed.
Click to expand it.
src/syncterm/term.c
+
6
−
0
View file @
bd4612ea
...
...
@@ -875,6 +875,7 @@ void begin_upload(struct bbslist *bbs, BOOL autozm, int lastch)
}
setvbuf
(
fp
,
NULL
,
_IOFBF
,
0x10000
);
suspend_rip
(
true
);
if
(
autozm
)
zmodem_upload
(
bbs
,
fp
,
path
);
else
{
...
...
@@ -904,6 +905,7 @@ void begin_upload(struct bbslist *bbs, BOOL autozm, int lastch)
break
;
}
}
suspend_rip
(
false
);
uifcbail
();
restorescreen
(
savscrn
);
freescreen
(
savscrn
);
...
...
@@ -941,6 +943,7 @@ void begin_download(struct bbslist *bbs)
i
=
0
;
uifc
.
helpbuf
=
"Select Protocol"
;
hold_update
=
FALSE
;
suspend_rip
(
true
);
switch
(
uifc
.
list
(
WIN_MID
|
WIN_SAV
,
0
,
0
,
0
,
&
i
,
NULL
,
"Protocol"
,
opts
))
{
case
-
1
:
check_exit
(
FALSE
);
...
...
@@ -963,6 +966,7 @@ void begin_download(struct bbslist *bbs)
xmodem_download
(
bbs
,
XMODEM
|
RECV
,
path
);
break
;
}
suspend_rip
(
false
);
hold_update
=
old_hold
;
uifcbail
();
restorescreen
(
savscrn
);
...
...
@@ -2613,11 +2617,13 @@ BOOL doterm(struct bbslist *bbs)
zrqbuf
[
++
j
]
=
0
;
if
(
j
==
sizeof
(
zrqinit
)
-
1
)
{
/* Have full sequence (Assumes zrinit and zrqinit are same length */
WRITE_OUTBUF
();
suspend_rip
(
true
);
if
(
!
strcmp
((
char
*
)
zrqbuf
,
(
char
*
)
zrqinit
))
zmodem_download
(
bbs
);
else
begin_upload
(
bbs
,
TRUE
,
inch
);
setup_mouse_events
(
&
ms
);
suspend_rip
(
false
);
zrqbuf
[
0
]
=
0
;
remain
=
1
;
}
...
...
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