Minor updates

This commit is contained in:
anschrammh 2019-10-16 19:27:43 +02:00
parent d41cebfee6
commit bd3d17c5c2
4 changed files with 14 additions and 13 deletions

View File

@ -36,5 +36,3 @@ double SDCardManager::getSize(const SizeUnit sizeUnit)
return result; return result;
} }

View File

@ -25,7 +25,7 @@ boolean task_blink(void *pData)
boolean task_batt_sensing(void *pData) boolean task_batt_sensing(void *pData)
{ {
View1Packet *p = (View1Packet *) pData; View1Packet *p = (View1Packet *) pData;
Serial.println(F("BATT SENSING...")); //Serial.println(F("BATT SENSING..."));
p->powerInfo = p->sab->getPowerManager().getPowerInfo(); p->powerInfo = p->sab->getPowerManager().getPowerInfo();
return true; return true;

View File

@ -20,14 +20,20 @@ class FTPServer : public TCPServer<T>
{ {
if(login != NULL) if(login != NULL)
{ {
_login = (char *)malloc((sizeof(char) * strlen(login)) + 1); if(strlen(login) > 0)
strcpy(_login, login); {
_login = (char *)malloc((sizeof(char) * strlen(login)) + 1);
strcpy(_login, login);
}
} }
if(password != NULL) if(password != NULL)
{ {
_password = (char *)malloc((sizeof(char) * strlen(password)) + 1); if(strlen(password) > 0)
strcpy(_password, password); {
_password = (char *)malloc((sizeof(char) * strlen(password)) + 1);
strcpy(_password, password);
}
} }
} }

View File

@ -143,12 +143,9 @@ class TCPServer
_currentClient->_clientState = TCPClient::DISCARDED; _currentClient->_clientState = TCPClient::DISCARDED;
} }
if(_currentClient->_dataSize > 0) processClientData(_currentClient);//We process the actual data
{ _currentClient->_newDataAvailable = false;
_currentClient->_newDataAvailable = false;
}
processClientData(_currentClient);//We process the actual data
if(_currentClient->_clientState == TCPClient::ClientState::DISCARDED) if(_currentClient->_clientState == TCPClient::ClientState::DISCARDED)
{ {
_currentClient->closeConnection(); _currentClient->closeConnection();