1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-10 13:53:49 +01:00
This commit is contained in:
J. Nick Koston
2025-10-01 23:30:33 +02:00
parent 785ad0cd47
commit 86bfedc30e
3 changed files with 3 additions and 5 deletions

View File

@@ -200,8 +200,6 @@ void MDNSComponent::dump_config() {
#endif
}
StaticVector<MDNSService, MDNS_SERVICE_COUNT> MDNSComponent::get_services() { return this->services_; }
} // namespace mdns
} // namespace esphome
#endif

View File

@@ -39,10 +39,10 @@ class MDNSComponent : public Component {
float get_setup_priority() const override { return setup_priority::AFTER_CONNECTION; }
#ifdef USE_MDNS_EXTRA_SERVICES
void add_extra_service(MDNSService service) { services_.push_back(std::move(service)); }
void add_extra_service(MDNSService service) { this->services_.push_back(std::move(service)); }
#endif
StaticVector<MDNSService, MDNS_SERVICE_COUNT> get_services();
const StaticVector<MDNSService, MDNS_SERVICE_COUNT> &get_services() const { return this->services_; }
void on_shutdown() override;

View File

@@ -144,7 +144,7 @@ void OpenThreadSrpComponent::setup() {
}
// Get mdns services and copy their data (strings are copied with strdup below)
auto mdns_services = this->mdns_->get_services();
const auto &mdns_services = this->mdns_->get_services();
ESP_LOGD(TAG, "Setting up SRP services. count = %d\n", mdns_services.size());
for (const auto &service : mdns_services) {
otSrpClientBuffersServiceEntry *entry = otSrpClientBuffersAllocateService(instance);