mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 09:21:09 +02:00
ywebserver: try to use port 8080 if port 80 is not available
Origin commit data
------------------
Branch: ni/coolstream
Commit: 860443c4e3
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-05-28 (Tue, 28 May 2013)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
committed by
Jacek Jendrzej
parent
5cd9f154ff
commit
44f7b6a0c9
@@ -118,8 +118,16 @@ CWebserver::~CWebserver() {
|
||||
#define MAX_TIMEOUTS_TO_TEST 100
|
||||
bool CWebserver::run(void) {
|
||||
if (!listenSocket.listen(port, HTTPD_MAX_CONNECTIONS)) {
|
||||
dperror("Socket cannot bind and listen. Abort.\n");
|
||||
return false;
|
||||
if (port != 80) {
|
||||
fprintf(stderr, "[yhttpd] Socket cannot bind and listen on port %d Abort.\n", port);
|
||||
return false;
|
||||
}
|
||||
fprintf(stderr, "[yhttpd] cannot bind and listen on port 80, retrying on port 8080.\n");
|
||||
port = 8080;
|
||||
if (!listenSocket.listen(port, HTTPD_MAX_CONNECTIONS)) {
|
||||
fprintf(stderr, "[yhttpd] Socket cannot bind and listen on port %d Abort.\n", port);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#ifdef Y_CONFIG_FEATURE_KEEP_ALIVE
|
||||
|
||||
|
Reference in New Issue
Block a user