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
23a9181c
Commit
23a9181c
authored
22 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Changed lputs() to return string length (matching prototype in sbbs.h).
Only calls services functions if JAVASCRIPT defined.
parent
54d30251
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sbbs3/sbbscon.c
+10
-2
10 additions, 2 deletions
src/sbbs3/sbbscon.c
with
10 additions
and
2 deletions
src/sbbs3/sbbscon.c
+
10
−
2
View file @
23a9181c
...
@@ -155,7 +155,7 @@ static const char* usage = "usage: %s [[setting] [...]]\n"
...
@@ -155,7 +155,7 @@ static const char* usage = "usage: %s [[setting] [...]]\n"
"
\t
defaults show default settings and options
\n
"
"
\t
defaults show default settings and options
\n
"
;
;
static
void
lputs
(
char
*
str
)
static
int
lputs
(
char
*
str
)
{
{
static
pthread_mutex_t
mutex
;
static
pthread_mutex_t
mutex
;
static
BOOL
mutex_initialized
;
static
BOOL
mutex_initialized
;
...
@@ -169,7 +169,7 @@ static void lputs(char *str)
...
@@ -169,7 +169,7 @@ static void lputs(char *str)
else
else
syslog
(
LOG_INFO
,
"%s"
,
str
);
syslog
(
LOG_INFO
,
"%s"
,
str
);
}
}
return
;
return
(
0
)
;
}
}
#endif
#endif
if
(
!
mutex_initialized
)
{
if
(
!
mutex_initialized
)
{
...
@@ -185,6 +185,8 @@ static void lputs(char *str)
...
@@ -185,6 +185,8 @@ static void lputs(char *str)
prompt_len
=
printf
(
prompt
,
thread_count
,
socket_count
,
client_count
,
served
);
prompt_len
=
printf
(
prompt
,
thread_count
,
socket_count
,
client_count
,
served
);
fflush
(
stdout
);
fflush
(
stdout
);
pthread_mutex_unlock
(
&
mutex
);
pthread_mutex_unlock
(
&
mutex
);
return
(
prompt_len
);
}
}
#ifdef __unix__
#ifdef __unix__
...
@@ -553,7 +555,9 @@ void _sighandler_quit(int sig)
...
@@ -553,7 +555,9 @@ void _sighandler_quit(int sig)
bbs_terminate
();
bbs_terminate
();
ftp_terminate
();
ftp_terminate
();
mail_terminate
();
mail_terminate
();
#ifdef JAVASCRIPT
services_terminate
();
services_terminate
();
#endif
while
(
bbs_running
||
ftp_running
||
mail_running
||
services_running
)
while
(
bbs_running
||
ftp_running
||
mail_running
||
services_running
)
mswait
(
1
);
mswait
(
1
);
if
(
is_daemon
)
if
(
is_daemon
)
...
@@ -1061,8 +1065,10 @@ int main(int argc, char** argv)
...
@@ -1061,8 +1065,10 @@ int main(int argc, char** argv)
_beginthread
((
void
(
*
)(
void
*
))
ftp_server
,
0
,
&
ftp_startup
);
_beginthread
((
void
(
*
)(
void
*
))
ftp_server
,
0
,
&
ftp_startup
);
if
(
run_mail
)
if
(
run_mail
)
_beginthread
((
void
(
*
)(
void
*
))
mail_server
,
0
,
&
mail_startup
);
_beginthread
((
void
(
*
)(
void
*
))
mail_server
,
0
,
&
mail_startup
);
#ifdef JAVASCRIPT
if
(
run_services
)
if
(
run_services
)
_beginthread
((
void
(
*
)(
void
*
))
services_thread
,
0
,
&
services_startup
);
_beginthread
((
void
(
*
)(
void
*
))
services_thread
,
0
,
&
services_startup
);
#endif
#ifdef __unix__
#ifdef __unix__
// Set up QUIT-type signals so they clean up properly.
// Set up QUIT-type signals so they clean up properly.
...
@@ -1130,7 +1136,9 @@ int main(int argc, char** argv)
...
@@ -1130,7 +1136,9 @@ int main(int argc, char** argv)
bbs_terminate
();
bbs_terminate
();
ftp_terminate
();
ftp_terminate
();
mail_terminate
();
mail_terminate
();
#ifdef JAVASCRIPT
services_terminate
();
services_terminate
();
#endif
while
(
bbs_running
||
ftp_running
||
mail_running
||
services_running
)
while
(
bbs_running
||
ftp_running
||
mail_running
||
services_running
)
mswait
(
1
);
mswait
(
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