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
ad3d2bc4
Commit
ad3d2bc4
authored
23 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
output_thread sets terminated to true if locally terminated.
parent
f6429e79
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
-1
7 additions, 1 deletion
src/sbbs3/main.cpp
with
7 additions
and
1 deletion
src/sbbs3/main.cpp
+
7
−
1
View file @
ad3d2bc4
...
...
@@ -828,6 +828,8 @@ void input_thread(void *arg)
}
sbbs
->
input_thread_running
=
false
;
if
(
node_socket
[
sbbs
->
cfg
.
node_num
-
1
]
==
INVALID_SOCKET
)
// Shutdown locally
sbbs
->
terminated
=
true
;
// Signal JS to stop execution
pthread_mutex_destroy
(
&
sbbs
->
input_thread_mutex
);
...
...
@@ -2602,6 +2604,7 @@ 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
();
...
...
@@ -2614,6 +2617,8 @@ 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 */
...
...
@@ -2681,8 +2686,8 @@ 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 */
client_off
(
node_socket
[
sbbs
->
cfg
.
node_num
-
1
]);
node_socket
[
sbbs
->
cfg
.
node_num
-
1
]
=
INVALID_SOCKET
;
sbbs
->
logout
();
...
...
@@ -3639,6 +3644,7 @@ void DLLCALL bbs_thread(void* arg)
if
(
node_socket
[
i
]
!=
INVALID_SOCKET
)
{
lprintf
(
"Closing node %d socket %d"
,
i
+
1
,
node_socket
[
i
]);
close_socket
(
node_socket
[
i
]);
node_socket
[
i
]
=
INVALID_SOCKET
;
}
sbbs
->
client_socket
=
INVALID_SOCKET
;
...
...
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