| 1337 | } |
| 1338 | |
| 1339 | bool WebUI_Server::ClearAuthIP(IPAddress ip, const char* sessionID) { |
| 1340 | AuthenticationIP* current = _head; |
| 1341 | AuthenticationIP* previous = NULL; |
| 1342 | bool done = false; |
| 1343 | while (current) { |
| 1344 | if ((ip == current->ip) && (strcmp(sessionID, current->sessionID) == 0)) { |
| 1345 | //remove |
| 1346 | done = true; |
| 1347 | if (current == _head) { |
| 1348 | _head = current->_next; |
| 1349 | _nb_ip--; |
| 1350 | delete current; |
| 1351 | current = _head; |
| 1352 | } else { |
| 1353 | previous->_next = current->_next; |
| 1354 | _nb_ip--; |
| 1355 | delete current; |
| 1356 | current = previous->_next; |
| 1357 | } |
| 1358 | } else { |
| 1359 | previous = current; |
| 1360 | current = current->_next; |
| 1361 | } |
| 1362 | } |
| 1363 | return done; |
| 1364 | } |
| 1365 | |
| 1366 | //Get info |
| 1367 | AuthenticationIP* WebUI_Server::GetAuth(IPAddress ip, const char* sessionID) { |
nothing calls this directly
no outgoing calls
no test coverage detected