Code cleanup

This commit is contained in:
szporowolik
2019-10-22 16:13:12 +02:00
parent a78ad87312
commit 53aade262e
8 changed files with 207 additions and 211 deletions

View File

@@ -127,14 +127,20 @@ public class TCPController
{
// Add to mySQL send buffer (find first empty slot)
PerunHelper.GUILogHistoryAdd(ref arrGUILogHistory, "Packet received" , 2,0, strRawTCPFrameType,true);
bool AddedDataToBuffer = false;
for (int i = 0; i < arrMySQLSendBuffer.Length - 1; i++)
{
if (arrMySQLSendBuffer[i] == null)
{
arrMySQLSendBuffer[i] = strReceivedData;
AddedDataToBuffer = true;
break;
}
}
if (!AddedDataToBuffer)
{
PerunHelper.GUILogHistoryAdd(ref arrGUILogHistory, "ERROR package was dropped", 1, 1, strRawTCPFrameType);
}
} else
{
// Keep alive