Skip to content

Commit

Permalink
compilation warnings
Browse files Browse the repository at this point in the history
esp8266/Arduino#8419 deprecated WiFiServer::available
in favor to WiFiServer::accept.
  • Loading branch information
Mikhail Gorbunov committed Apr 25, 2023
1 parent 685aa22 commit d518b61
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/RemoteDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,12 @@ void RemoteDebug::handle() {
if (TelnetClient && TelnetClient.connected()) {

// Verify if the IP is same than actual conection

#if ESP_IDF_VERSION_MAJOR >= 3
WiFiClient newClient = TelnetServer.accept();
#else
WiFiClient newClient; // @suppress("Abstract class cannot be instantiated")
newClient = TelnetServer.available();
#endif
String ip = newClient.remoteIP().toString();

if (ip == TelnetClient.remoteIP().toString()) {
Expand All @@ -456,7 +459,11 @@ void RemoteDebug::handle() {

// New TCP client

#if ESP_IDF_VERSION_MAJOR >= 3
TelnetClient = TelnetServer.accept();
#else
TelnetClient = TelnetServer.available();
#endif

// Password request ? - 18/07/18

Expand Down Expand Up @@ -1788,7 +1795,7 @@ void RemoteDebug::setNoFilter() {

// Silence

void RemoteDebug::silence(boolean activate, boolean showMessage, boolean fromBreak, uint32_t timeout) {
void RemoteDebug::silence(boolean activate, boolean showMessage, boolean /*fromBreak*/, uint32_t timeout) {

// Set silence and timeout

Expand Down

0 comments on commit d518b61

Please sign in to comment.