Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bytevia
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michael Pastushkov
bytevia
Commits
d020106a
Commit
d020106a
authored
Sep 18, 2024
by
Michael Pastushkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
innocent fixes
parent
9087b375
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
src/bytevia.c
+17
-10
No files found.
src/bytevia.c
View file @
d020106a
...
...
@@ -241,7 +241,7 @@ int build_tcp(void) {
int
wait_connection
(
void
)
{
#if defined(__MINGW32__)
|| defined(__CYGWIN__)
#if defined(__MINGW32__)
int
client_addr_size
;
#else
unsigned
int
client_addr_size
;
...
...
@@ -475,7 +475,7 @@ void fork_tcp() {
#endif
}
void
serve
(
void
)
{
void
serve
()
{
#ifdef __MINGW32__
run
();
#else
...
...
@@ -641,9 +641,16 @@ void check_options() {
/* Consistency checks */
if
(
options
.
mode
==
MODE_SERVER
&&
!
options
.
stay_alive
)
{
printf
(
"%s:
%s
\n
"
,
name
,
"option --stay-alive is switched on with --mode=server"
);
printf
(
"%s:
option --stay-alive is switched on with --mode=server
\n
"
,
name
);
options
.
stay_alive
=
0
;
}
#ifdef __MINGW32__
if
(
options
.
fork
)
{
printf
(
"%s: option --fork is switched off, Microsoft Windows is incompatible with forking
\n
"
,
name
);
options
.
fork
=
0
;
}
#endif
}
...
...
@@ -698,13 +705,6 @@ int main(int argc, char *argv[]) {
}
check_options
();
ret
=
(
options
.
proto
==
SOCK_STREAM
)
?
build_tcp
()
:
build_udp
();
if
(
ret
!=
0
)
exit
(
1
);
#ifndef __MINGW32__
signal
(
SIGCHLD
,
SIG_IGN
);
#endif
...
...
@@ -719,6 +719,13 @@ int main(int argc, char *argv[]) {
printf
(
" fork: %s
\n
"
,
options
.
fork
?
"yes"
:
"no"
);
}
ret
=
(
options
.
proto
==
SOCK_STREAM
)
?
build_tcp
()
:
build_udp
();
if
(
ret
!=
0
)
exit
(
1
);
do
{
if
(
wait_connection
()
==
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment