mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
remove esp8266
This commit is contained in:
@@ -19,12 +19,7 @@
|
||||
#include "uuid/telnet.h"
|
||||
|
||||
#include <Arduino.h>
|
||||
#if defined(ESP8266)
|
||||
#include <ESP8266WiFi.h>
|
||||
#elif defined(ESP32)
|
||||
#include <WiFi.h>
|
||||
#endif
|
||||
|
||||
#include <WiFiUdp.h>
|
||||
|
||||
#include <algorithm>
|
||||
@@ -72,9 +67,9 @@ TelnetService::TelnetService(std::shared_ptr<uuid::console::Commands> commands,
|
||||
}
|
||||
|
||||
TelnetService::TelnetService(uint16_t port, std::shared_ptr<uuid::console::Commands> commands, unsigned int context, unsigned int flags)
|
||||
: TelnetService(port,
|
||||
[commands, context, flags](Stream & stream, const IPAddress & addr __attribute__((unused)), uint16_t port __attribute__((unused)))
|
||||
-> std::shared_ptr<uuid::console::Shell> { return std::make_shared<uuid::console::StreamConsole>(commands, stream, context, flags); }) {
|
||||
: TelnetService(port, [commands, context, flags](Stream & stream, const IPAddress & addr __attribute__((unused)), uint16_t port __attribute__((unused))) -> std::shared_ptr<uuid::console::Shell> {
|
||||
return std::make_shared<uuid::console::StreamConsole>(commands, stream, context, flags);
|
||||
}) {
|
||||
}
|
||||
|
||||
TelnetService::TelnetService(shell_factory_function shell_factory)
|
||||
@@ -150,9 +145,7 @@ void TelnetService::loop() {
|
||||
if (client) {
|
||||
if (connections_.size() >= maximum_connections_) {
|
||||
#if UUID_TELNET_HAVE_WIFICLIENT_REMOTE
|
||||
logger_.info(F("New connection from [%s]:%u rejected (connection limit reached)"),
|
||||
uuid::printable_to_string(client.remoteIP()).c_str(),
|
||||
client.remotePort());
|
||||
logger_.info(F("New connection from [%s]:%u rejected (connection limit reached)"), uuid::printable_to_string(client.remoteIP()).c_str(), client.remotePort());
|
||||
#else
|
||||
logger_.info(F("New connection rejected (connection limit reached)"));
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user