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
3dce9c59
Commit
3dce9c59
authored
23 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Fixed command-line options for running without FTP and Mail servers.
Fixed defaults display command-line option.
parent
9159fee0
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
+23
-11
23 additions, 11 deletions
src/sbbs3/sbbscon.c
with
23 additions
and
11 deletions
src/sbbs3/sbbscon.c
+
23
−
11
View file @
3dce9c59
...
@@ -56,8 +56,10 @@
...
@@ -56,8 +56,10 @@
/* Global variables */
/* Global variables */
BOOL
bbs_running
=
FALSE
;
BOOL
bbs_running
=
FALSE
;
bbs_startup_t
bbs_startup
;
bbs_startup_t
bbs_startup
;
BOOL
run_ftp
=
TRUE
;
BOOL
ftp_running
=
FALSE
;
BOOL
ftp_running
=
FALSE
;
ftp_startup_t
ftp_startup
;
ftp_startup_t
ftp_startup
;
BOOL
run_mail
=
TRUE
;
BOOL
mail_running
=
FALSE
;
BOOL
mail_running
=
FALSE
;
mail_startup_t
mail_startup
;
mail_startup_t
mail_startup
;
BOOL
run_services
=
TRUE
;
BOOL
run_services
=
TRUE
;
...
@@ -80,12 +82,14 @@ static const char* usage = "\nusage: %s [[option] [...]]\n"
...
@@ -80,12 +82,14 @@ static const char* usage = "\nusage: %s [[option] [...]]\n"
"tl<node> set Last Telnet Node Number
\n
"
"tl<node> set Last Telnet Node Number
\n
"
"tp<port> set Telnet Server Port
\n
"
"tp<port> set Telnet Server Port
\n
"
"rp<port> set RLogin Server Port (and enable RLogin Server)
\n
"
"rp<port> set RLogin Server Port (and enable RLogin Server)
\n
"
"fp<port> set FTP Server Port
(0 to disable FTP Server)
\n
"
"fp<port> set FTP Server Port
\n
"
"sp<port> set SMTP Server Port
(0 to disable Mail Server)
\n
"
"sp<port> set SMTP Server Port
\n
"
"sr<port> set SMTP Relay Port
\n
"
"sr<port> set SMTP Relay Port
\n
"
"pp<port> set POP3 Server Port
\n
"
"pp<port> set POP3 Server Port
\n
"
"u<user> set username for BBS to run as
\n
"
"u<user> set username for BBS to run as
\n
"
"ns run without services (no services module)
\n
"
"nf run without FTP Server
\n
"
"nm run without Mail Server
\n
"
"ns run without Services (no services module)
\n
"
"
\n
"
"
\n
"
;
;
...
@@ -515,14 +519,16 @@ int main(int argc, char** argv)
...
@@ -515,14 +519,16 @@ int main(int argc, char** argv)
if
(
*
arg
==
'-'
)
/* ignore prepended slashes */
if
(
*
arg
==
'-'
)
/* ignore prepended slashes */
arg
++
;
arg
++
;
if
(
!
stricmp
(
arg
,
"defaults"
))
{
if
(
!
stricmp
(
arg
,
"defaults"
))
{
printf
(
"default settings:
\n\n
"
);
printf
(
"default settings:
\n
"
);
printf
(
"Telnet server port:
\t
%u
\n
"
,
bbs_startup
.
telnet_port
);
printf
(
"
\n
"
);
printf
(
"Telnet server port:
\t
%u
\n
"
,
IPPORT_TELNET
);
printf
(
"Telnet first node:
\t
%u
\n
"
,
bbs_startup
.
first_node
);
printf
(
"Telnet first node:
\t
%u
\n
"
,
bbs_startup
.
first_node
);
printf
(
"Telnet last node:
\t
%u
\n
"
,
bbs_startup
.
last_node
);
printf
(
"Telnet last node:
\t
%u
\n
"
,
bbs_startup
.
last_node
);
printf
(
"FTP server port:
\t
%u
\n
"
,
ftp_startup
.
port
);
printf
(
"FTP server port:
\t
%u
\n
"
,
IPPORT_FTP
);
printf
(
"SMTP server port:
\t
%u
\n
"
,
mail_startup
.
smtp_port
);
printf
(
"SMTP server port:
\t
%u
\n
"
,
IPPORT_SMTP
);
printf
(
"SMTP relay port:
\t
%u
\n
"
,
mail_startup
.
relay_port
);
printf
(
"SMTP relay port:
\t
%u
\n
"
,
IPPORT_SMTP
);
printf
(
"POP3 server port:
\t
%u
\n
"
,
mail_startup
.
pop3_port
);
printf
(
"POP3 server port:
\t
%u
\n
"
,
IPPORT_POP3
);
printf
(
"
\n
"
);
return
(
0
);
return
(
0
);
}
}
switch
(
toupper
(
*
(
arg
++
)))
{
switch
(
toupper
(
*
(
arg
++
)))
{
...
@@ -593,6 +599,12 @@ int main(int argc, char** argv)
...
@@ -593,6 +599,12 @@ int main(int argc, char** argv)
break
;
break
;
case
'N'
:
/* No */
case
'N'
:
/* No */
switch
(
toupper
(
*
(
arg
++
)))
{
switch
(
toupper
(
*
(
arg
++
)))
{
case
'F'
:
/* FTP Server */
run_ftp
=
FALSE
;
break
;
case
'M'
:
/* Mail Server */
run_mail
=
FALSE
;
break
;
case
'S'
:
/* Services */
case
'S'
:
/* Services */
run_services
=
FALSE
;
run_services
=
FALSE
;
break
;
break
;
...
@@ -608,9 +620,9 @@ int main(int argc, char** argv)
...
@@ -608,9 +620,9 @@ int main(int argc, char** argv)
}
}
_beginthread
((
void
(
*
)(
void
*
))
bbs_thread
,
0
,
&
bbs_startup
);
_beginthread
((
void
(
*
)(
void
*
))
bbs_thread
,
0
,
&
bbs_startup
);
if
(
ftp_startup
.
port
)
if
(
run_ftp
)
_beginthread
((
void
(
*
)(
void
*
))
ftp_server
,
0
,
&
ftp_startup
);
_beginthread
((
void
(
*
)(
void
*
))
ftp_server
,
0
,
&
ftp_startup
);
if
(
mail
_startup
.
smtp_port
)
if
(
run_
mail
)
_beginthread
((
void
(
*
)(
void
*
))
mail_server
,
0
,
&
mail_startup
);
_beginthread
((
void
(
*
)(
void
*
))
mail_server
,
0
,
&
mail_startup
);
if
(
run_services
)
if
(
run_services
)
_beginthread
((
void
(
*
)(
void
*
))
services_thread
,
0
,
&
services_startup
);
_beginthread
((
void
(
*
)(
void
*
))
services_thread
,
0
,
&
services_startup
);
...
...
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