mirror of
https://github.com/esphome/esphome.git
synced 2026-03-01 02:14:19 -07:00
Merge branch 'get_peername_stack_save_ram' into integration
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#ifdef USE_VOICE_ASSISTANT
|
||||
|
||||
#include "esphome/components/socket/socket.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
#include <cinttypes>
|
||||
@@ -430,9 +431,11 @@ void VoiceAssistant::client_subscription(api::APIConnection *client, bool subscr
|
||||
|
||||
if (this->api_client_ != nullptr) {
|
||||
ESP_LOGE(TAG, "Multiple API Clients attempting to connect to Voice Assistant");
|
||||
ESP_LOGE(TAG, "Current client: %s (%s)", this->api_client_->get_name().c_str(),
|
||||
this->api_client_->get_peername().c_str());
|
||||
ESP_LOGE(TAG, "New client: %s (%s)", client->get_name().c_str(), client->get_peername().c_str());
|
||||
char peername[socket::PEERNAME_MAX_LEN];
|
||||
this->api_client_->get_peername_to(peername);
|
||||
ESP_LOGE(TAG, "Current client: %s (%s)", this->api_client_->get_name(), peername);
|
||||
client->get_peername_to(peername);
|
||||
ESP_LOGE(TAG, "New client: %s (%s)", client->get_name(), peername);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user