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
|
||||
./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
|
||||
* 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).
|
||||
|
@ -333,17 +333,18 @@ bool HttpServer::init() {
|
||||
}
|
||||
});
|
||||
|
||||
/* start http server on a separate thread */
|
||||
auto http_addr=config_->get_http_addr_str();
|
||||
if(http_addr.empty())
|
||||
http_addr=config_->get_ip_addr_str();
|
||||
std::string http_addr = config_->get_http_addr_str();
|
||||
if (http_addr.empty())
|
||||
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, [&]() {
|
||||
try {
|
||||
svr_.listen(http_addr.c_str(), config_->get_http_port());
|
||||
} catch (...) {
|
||||
BOOST_LOG_TRIVIAL(fatal)
|
||||
<< "http_server:: "
|
||||
BOOST_LOG_TRIVIAL(fatal) << "http_server:: "
|
||||
<< "failed to listen to " << http_addr << ":"
|
||||
<< config_->get_http_port();
|
||||
return false;
|
||||
|
@ -127,7 +127,9 @@ int main(int argc, char* argv[]) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (vm.count("http_addr")) {
|
||||
config->set_http_addr_str(vm["http_addr"].as<std::string>());
|
||||
}
|
||||
/* override configuration according to command line args */
|
||||
if (vm.count("http_port")) {
|
||||
config->set_http_port(vm["http_port"].as<int>());
|
||||
|
Loading…
x
Reference in New Issue
Block a user