Skip to content

Commit 966bf45

Browse files
committed
rename stopAllexcepted to stopAllExcept and simplify the compare
1 parent a3bc0e9 commit 966bf45

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

libraries/ESP8266WiFi/src/WiFiClient.cpp

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -302,22 +302,11 @@ void WiFiClient::stopAll()
302302
}
303303

304304

305-
void WiFiClient::stopAllexcepted(WiFiClient * exC) {
305+
void WiFiClient::stopAllExcept(WiFiClient * exC) {
306306
for (WiFiClient* it = _s_first; it; it = it->_next) {
307307
ClientContext* c = it->_client;
308308

309-
if(c && exC->_client) {
310-
if(exC->_client->getRemoteAddress() == c->getRemoteAddress()) {
311-
if(exC->_client->getRemotePort() == c->getRemotePort()) {
312-
if(exC->_client->getLocalPort() == c->getLocalPort()) {
313-
// ignore this
314-
c = NULL;
315-
}
316-
}
317-
}
318-
}
319-
320-
if (c) {
309+
if (c && c != exC->_client) {
321310
c->abort();
322311
c->unref();
323312
it->_client = 0;

libraries/ESP8266WiFi/src/WiFiClient.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class WiFiClient : public Client, public SList<WiFiClient> {
9393
using Print::write;
9494

9595
static void stopAll();
96-
static void stopAllexcepted(WiFiClient * c);
96+
static void stopAllExcept(WiFiClient * c);
9797

9898
private:
9999

libraries/ESP8266httpUpdate/src/ESP8266httpUpdate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ t_httpUpdate_return ESP8266HTTPUpdate::update(const char * host, uint16_t port,
130130
} else {
131131

132132
WiFiUDP::stopAll();
133-
WiFiClient::stopAllexcepted(&tcp);
133+
WiFiClient::stopAllExcept(&tcp);
134134

135135
delay(100);
136136

0 commit comments

Comments
 (0)