Merge branch 'master' into codec_am824
This commit is contained in:
commit
29dcfba0bd
@ -73,22 +73,8 @@ parse_url(const std::string& _url) {
|
|||||||
return std::make_tuple(host.length() > 0, protocol, host, port, path);
|
return std::make_tuple(host.length() > 0, protocol, host, port, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string get_host_id() {
|
|
||||||
char hostname[64];
|
|
||||||
gethostname(hostname, sizeof hostname);
|
|
||||||
std::stringstream ss;
|
|
||||||
ss << std::hex << (uint32_t)gethostid();
|
|
||||||
return ss.str();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string get_host_name() {
|
|
||||||
char hostname[64];
|
|
||||||
gethostname(hostname, sizeof hostname);
|
|
||||||
return hostname;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string get_node_id() {
|
std::string get_node_id() {
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << "AES67 daemon " << get_host_id();
|
ss << "AES67 daemon " << std::hex << (uint32_t)gethostid();
|
||||||
return ss.str();
|
return ss.str();
|
||||||
}
|
}
|
||||||
|
@ -34,8 +34,6 @@ std::tuple<bool /* res */,
|
|||||||
std::string /* path */>
|
std::string /* path */>
|
||||||
parse_url(const std::string& _url);
|
parse_url(const std::string& _url);
|
||||||
|
|
||||||
std::string get_host_id();
|
|
||||||
std::string get_host_name();
|
|
||||||
std::string get_node_id();
|
std::string get_node_id();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user