mirror of
https://github.com/esphome/esphome.git
synced 2026-02-15 22:09:36 -07:00
Merge branch 'flatten-realloc-insert-callers' into integration
This commit is contained in:
@@ -195,7 +195,7 @@ void APIServer::remove_client_(size_t client_index) {
|
||||
#endif
|
||||
}
|
||||
|
||||
void APIServer::accept_new_connections_() {
|
||||
void __attribute__((flatten)) APIServer::accept_new_connections_() {
|
||||
while (true) {
|
||||
struct sockaddr_storage source_addr;
|
||||
socklen_t addr_len = sizeof(source_addr);
|
||||
|
||||
@@ -11,7 +11,7 @@ static const char *const TAG = "web_server_base";
|
||||
|
||||
WebServerBase *global_web_server_base = nullptr; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
|
||||
|
||||
void WebServerBase::add_handler(AsyncWebHandler *handler) {
|
||||
void __attribute__((flatten)) WebServerBase::add_handler(AsyncWebHandler *handler) {
|
||||
// remove all handlers
|
||||
|
||||
#ifdef USE_WEBSERVER_AUTH
|
||||
|
||||
@@ -488,6 +488,19 @@ bool WiFiComponent::matches_configured_network_(const char *ssid, const uint8_t
|
||||
return false;
|
||||
}
|
||||
|
||||
void __attribute__((flatten)) WiFiComponent::set_sta_priority(const bssid_t bssid, int8_t priority) {
|
||||
for (auto &it : this->sta_priorities_) {
|
||||
if (it.bssid == bssid) {
|
||||
it.priority = priority;
|
||||
return;
|
||||
}
|
||||
}
|
||||
this->sta_priorities_.push_back(WiFiSTAPriority{
|
||||
.bssid = bssid,
|
||||
.priority = priority,
|
||||
});
|
||||
}
|
||||
|
||||
void WiFiComponent::log_discarded_scan_result_(const char *ssid, const uint8_t *bssid, int8_t rssi, uint8_t channel) {
|
||||
#if ESPHOME_LOG_LEVEL >= ESPHOME_LOG_LEVEL_VERBOSE
|
||||
// Skip logging during roaming scans to avoid log buffer overflow
|
||||
|
||||
@@ -497,18 +497,7 @@ class WiFiComponent : public Component {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
void set_sta_priority(const bssid_t bssid, int8_t priority) {
|
||||
for (auto &it : this->sta_priorities_) {
|
||||
if (it.bssid == bssid) {
|
||||
it.priority = priority;
|
||||
return;
|
||||
}
|
||||
}
|
||||
this->sta_priorities_.push_back(WiFiSTAPriority{
|
||||
.bssid = bssid,
|
||||
.priority = priority,
|
||||
});
|
||||
}
|
||||
void set_sta_priority(const bssid_t bssid, int8_t priority);
|
||||
|
||||
network::IPAddresses wifi_sta_ip_addresses();
|
||||
// Remove before 2026.9.0
|
||||
|
||||
Reference in New Issue
Block a user