1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-12 01:53:07 +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;