fix(mdns): don't hardcode mDNS instance name (#3084)

This commit is contained in:
Cameron Gutman 2024-08-25 18:20:33 -05:00 committed by GitHub
commit 88ce5077b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 71 additions and 5 deletions

View file

@ -426,7 +426,8 @@ namespace platf::publish {
return nullptr;
}
name.reset(avahi::strdup(SERVICE_NAME));
auto instance_name = net::mdns_instance_name(boost::asio::ip::host_name());
name.reset(avahi::strdup(instance_name.c_str()));
client.reset(
avahi::client_new(avahi::simple_poll_get(poll.get()), avahi::ClientFlags(0), client_callback, nullptr, &avhi_error));