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
d74267e8
Commit
d74267e8
authored
21 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Addded recycle semaphore to startup structures for inter-process server
recycling without using semaphore files.
parent
85f9cf2a
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/ntsvcs.c
+11
-0
11 additions, 0 deletions
src/sbbs3/ntsvcs.c
with
11 additions
and
0 deletions
src/sbbs3/ntsvcs.c
+
11
−
0
View file @
d74267e8
...
...
@@ -74,6 +74,7 @@ typedef struct {
char
*
display_name
;
char
*
description
;
void
*
startup
;
HANDLE
*
recycle_sem
;
void
(
*
thread
)(
void
*
arg
);
void
(
WINAPI
*
ctrl_handler
)(
DWORD
);
HANDLE
log_handle
;
...
...
@@ -89,6 +90,7 @@ sbbs_ntsvc_t bbs ={
"Provides support for Telnet and RLogin clients and executes timed events. "
\
"This service provides the critical functions of your Synchronet BBS."
,
&
bbs_startup
,
&
bbs_startup
.
recycle_sem
,
bbs_thread
,
bbs_ctrl_handler
,
INVALID_HANDLE_VALUE
...
...
@@ -102,6 +104,7 @@ sbbs_ntsvc_t event ={
NULL
,
NULL
,
NULL
,
NULL
,
INVALID_HANDLE_VALUE
};
...
...
@@ -110,6 +113,7 @@ sbbs_ntsvc_t ftp = {
"Synchronet FTP Server"
,
"Provides support for FTP clients (including web browsers) for file transfers."
,
&
ftp_startup
,
&
ftp_startup
.
recycle_sem
,
ftp_server
,
ftp_ctrl_handler
,
INVALID_HANDLE_VALUE
...
...
@@ -121,6 +125,7 @@ sbbs_ntsvc_t web = {
"Synchronet Web Server"
,
"Provides support for Web (HTML/HTTP) clients (browsers)."
,
&
web_startup
,
&
web_startup
.
recycle_sem
,
web_server
,
web_ctrl_handler
,
INVALID_HANDLE_VALUE
...
...
@@ -133,6 +138,7 @@ sbbs_ntsvc_t mail = {
"Sends and receives Internet e-mail (using SMTP) and allows users to remotely "
\
"access their e-mail using an Internet mail client (using POP3)."
,
&
mail_startup
,
&
mail_startup
.
recycle_sem
,
mail_server
,
mail_ctrl_handler
,
INVALID_HANDLE_VALUE
...
...
@@ -146,6 +152,7 @@ sbbs_ntsvc_t services = {
"Stock services include Finger, Gopher, NNTP, and IRC. Edit your ctrl/services.ini "
\
"file for configuration of individual Synchronet Services."
,
&
services_startup
,
&
services_startup
.
recycle_sem
,
services_thread
,
services_ctrl_handler
,
INVALID_HANDLE_VALUE
...
...
@@ -377,6 +384,10 @@ static void WINAPI svc_start(sbbs_ntsvc_t* svc, DWORD argc, LPTSTR *argv)
return
;
}
if
(
svc
->
recycle_sem
!=
NULL
&&
((
*
svc
->
recycle_sem
)
=
CreateSemaphore
(
NULL
,
0
,
1
,
svc
->
name
))
==
NULL
)
svc_lputs
(
svc
,
"!Error creating recycle semaphore"
);
memset
(
&
svc
->
status
,
0
,
sizeof
(
SERVICE_STATUS
));
svc
->
status
.
dwServiceType
=
SERVICE_WIN32_SHARE_PROCESS
;
svc
->
status
.
dwControlsAccepted
=
SERVICE_ACCEPT_SHUTDOWN
;
...
...
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