1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

rename stopAllexcepted to stopAllExcept and simplify the compare

This commit is contained in:
Markus Sattler 2015-08-29 15:33:41 +02:00
parent a3bc0e924b
commit 966bf45b35
3 changed files with 4 additions and 15 deletions

View File

@ -302,22 +302,11 @@ void WiFiClient::stopAll()
}
void WiFiClient::stopAllexcepted(WiFiClient * exC) {
void WiFiClient::stopAllExcept(WiFiClient * exC) {
for (WiFiClient* it = _s_first; it; it = it->_next) {
ClientContext* c = it->_client;
if(c && exC->_client) {
if(exC->_client->getRemoteAddress() == c->getRemoteAddress()) {
if(exC->_client->getRemotePort() == c->getRemotePort()) {
if(exC->_client->getLocalPort() == c->getLocalPort()) {
// ignore this
c = NULL;
}
}
}
}
if (c) {
if (c && c != exC->_client) {
c->abort();
c->unref();
it->_client = 0;

View File

@ -93,7 +93,7 @@ public:
using Print::write;
static void stopAll();
static void stopAllexcepted(WiFiClient * c);
static void stopAllExcept(WiFiClient * c);
private:

View File

@ -130,7 +130,7 @@ t_httpUpdate_return ESP8266HTTPUpdate::update(const char * host, uint16_t port,
} else {
WiFiUDP::stopAll();
WiFiClient::stopAllexcepted(&tcp);
WiFiClient::stopAllExcept(&tcp);
delay(100);