Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Icecast-Server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
94
Issues
94
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
External Wiki
External Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
Icecast-Server
Commits
5dd00e74
Commit
5dd00e74
authored
Aug 09, 2002
by
Michael Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix crash when socket couldn't be bound.
svn path=/trunk/icecast/; revision=3776
parent
0ecb6689
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
src/main.c
src/main.c
+11
-4
No files found.
src/main.c
View file @
5dd00e74
...
...
@@ -150,17 +150,19 @@ static int _start_listening(void)
}
/* bind the socket and start listening */
static
void
_server_proc_init
(
void
)
static
int
_server_proc_init
(
void
)
{
if
(
!
_setup_socket
())
{
fprintf
(
stderr
,
"Could not create listener socket on port %d
\n
"
,
config_get_config
()
->
port
);
return
;
return
0
;
}
if
(
!
_start_listening
())
{
fprintf
(
stderr
,
"Failed trying to listen on server socket
\n
"
);
return
;
return
0
;
}
return
1
;
}
/* this is the heart of the beast */
...
...
@@ -291,7 +293,12 @@ int main(int argc, char **argv)
/* override config file options with commandline options */
config_parse_cmdline
(
argc
,
argv
);
_server_proc_init
();
/* Bind socket, before we change userid */
/* Bind socket, before we change userid */
if
(
!
_server_proc_init
())
{
fprintf
(
stderr
,
"Server startup failed. Exiting.
\n
"
);
_shutdown_subsystems
();
return
1
;
}
_ch_root_uid_setup
();
/* Change user id and root if requested/possible */
...
...
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