Fix to avoid crash when option -a is not provided plus cosmetic changes.
This commit is contained in:
parent
f05f40c2ad
commit
45a39a4d2e
@ -87,7 +87,7 @@ The daemon should work on all Ubuntu starting from 18.04 onward, it's possible t
|
|||||||
cd daemon
|
cd daemon
|
||||||
./aes67-daemon -c daemon.conf
|
./aes67-daemon -c daemon.conf
|
||||||
|
|
||||||
* use the daemon option _-a_ if you want to bind the daemon HTTP server to another addrress. For example _-a 0.0.0.0_ to bind the daemon HTTP server to all the local network interfaces.
|
* use the daemon option _-a_ if you want to bind the daemon HTTP server to another address. For example _-a 0.0.0.0_ to bind the daemon HTTP server to all the local network interfaces.
|
||||||
* open a browser and load the daemon configuration WebUI at http://[your_ip]:8080
|
* open a browser and load the daemon configuration WebUI at http://[your_ip]:8080
|
||||||
* on the WebUI use the Browser tab to see the other ASE67 Sources advertised on the network.
|
* on the WebUI use the Browser tab to see the other ASE67 Sources advertised on the network.
|
||||||
* on the WebUI use the Sinks tab to create a receiver by specifying a remote Source manually or by selecting one of the remote Source discovered (check the Use SDP option to enable this).
|
* on the WebUI use the Sinks tab to create a receiver by specifying a remote Source manually or by selecting one of the remote Source discovered (check the Use SDP option to enable this).
|
||||||
|
@ -333,17 +333,18 @@ bool HttpServer::init() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/* start http server on a separate thread */
|
std::string http_addr = config_->get_http_addr_str();
|
||||||
auto http_addr=config_->get_http_addr_str();
|
if (http_addr.empty())
|
||||||
if(http_addr.empty())
|
http_addr = config_->get_ip_addr_str();
|
||||||
http_addr=config_->get_ip_addr_str();
|
BOOST_LOG_TRIVIAL(info) << "http_server:: binding to " << http_addr << ":"
|
||||||
|
<< config_->get_http_port();
|
||||||
|
|
||||||
|
/* start http server on a separate thread */
|
||||||
res_ = std::async(std::launch::async, [&]() {
|
res_ = std::async(std::launch::async, [&]() {
|
||||||
try {
|
try {
|
||||||
svr_.listen(http_addr.c_str(), config_->get_http_port());
|
svr_.listen(http_addr.c_str(), config_->get_http_port());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
BOOST_LOG_TRIVIAL(fatal)
|
BOOST_LOG_TRIVIAL(fatal) << "http_server:: "
|
||||||
<< "http_server:: "
|
|
||||||
<< "failed to listen to " << http_addr << ":"
|
<< "failed to listen to " << http_addr << ":"
|
||||||
<< config_->get_http_port();
|
<< config_->get_http_port();
|
||||||
return false;
|
return false;
|
||||||
|
@ -127,7 +127,9 @@ int main(int argc, char* argv[]) {
|
|||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vm.count("http_addr")) {
|
||||||
config->set_http_addr_str(vm["http_addr"].as<std::string>());
|
config->set_http_addr_str(vm["http_addr"].as<std::string>());
|
||||||
|
}
|
||||||
/* override configuration according to command line args */
|
/* override configuration according to command line args */
|
||||||
if (vm.count("http_port")) {
|
if (vm.count("http_port")) {
|
||||||
config->set_http_port(vm["http_port"].as<int>());
|
config->set_http_port(vm["http_port"].as<int>());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user