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
e45e1caf
Commit
e45e1caf
authored
23 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
hangup() now handles calling client_off().
parent
0aac66f7
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/main.cpp
+7
-10
7 additions, 10 deletions
src/sbbs3/main.cpp
with
7 additions
and
10 deletions
src/sbbs3/main.cpp
+
7
−
10
View file @
e45e1caf
...
...
@@ -2286,9 +2286,10 @@ BOOL DLLCALL getstats(scfg_t* cfg, char node, stats_t* stats)
void
sbbs_t
::
hangup
(
void
)
{
mswait
(
1000
);
/* Give socket output buffer time to flush */
riosync
(
0
);
if
(
client_socket
!=
INVALID_SOCKET
)
{
mswait
(
1000
);
/* Give socket output buffer time to flush */
riosync
(
0
);
client_off
(
client_socket
);
close_socket
(
client_socket
);
client_socket
=
INVALID_SOCKET
;
}
...
...
@@ -2335,8 +2336,8 @@ void sbbs_t::putcom(char *str, int len)
void
sbbs_t
::
riosync
(
char
abortable
)
{
if
(
useron
.
misc
&
(
RIP
|
WIP
))
/* don't allow abort with RIP or WIP */
abortable
=
0
;
/* mainly because of ANSI cursor posi
s
tion response */
if
(
sys_status
&
SS_ABORT
)
/* no need to sync if already aborting */
abortable
=
0
;
/* mainly because of ANSI cursor position response */
if
(
sys_status
&
SS_ABORT
)
/* no need to sync if already aborting */
return
;
time_t
start
=
time
(
NULL
);
while
(
online
&&
rioctl
(
TXBC
))
{
/* wait up to three minutes for tx buf empty */
...
...
@@ -2346,7 +2347,7 @@ void sbbs_t::riosync(char abortable)
break
;
/* abort sync */
}
if
(
time
(
NULL
)
-
start
>
180
)
{
/* timeout */
rioctl
(
IOCS
|
PAUSE
);
errorlog
(
"riosync timeout"
);
break
;
}
mswait
(
100
);
...
...
@@ -2604,7 +2605,6 @@ void node_thread(void* arg)
time_t
now
;
node_t
node
;
user_t
user
;
SOCKET
client_socket
;
sbbs_t
*
sbbs
=
(
sbbs_t
*
)
arg
;
update_clients
();
...
...
@@ -2617,8 +2617,6 @@ void node_thread(void* arg)
srand
(
clock
());
/* Seed random number generator */
sbbs_random
(
10
);
/* Throw away first number */
client_socket
=
node_socket
[
sbbs
->
cfg
.
node_num
-
1
];
#ifdef JAVASCRIPT
if
(
!
(
startup
->
options
&
BBS_OPT_NO_JAVASCRIPT
))
{
if
(
!
sbbs
->
js_init
())
/* This must be done in the context of the node thread */
...
...
@@ -2686,8 +2684,7 @@ void node_thread(void* arg)
PlaySound
(
startup
->
hangup_sound
,
NULL
,
SND_ASYNC
|
SND_FILENAME
);
#endif
client_off
(
client_socket
);
sbbs
->
hangup
();
/* just to be sure we shut down the output_thread */
sbbs
->
hangup
();
/* closes sockets, calls client_off, and shuts down the output_thread */
node_socket
[
sbbs
->
cfg
.
node_num
-
1
]
=
INVALID_SOCKET
;
sbbs
->
logout
();
...
...
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