1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-23 16:16:13 +01:00

Comments and a reliability fix.

This commit is contained in:
Asbelos 2021-02-08 12:28:16 +00:00
parent c1a8206667
commit 6737785388
2 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,22 @@
/*
* © 2020, Chris Harlow. All rights reserved.
* © 2020, Harald Barth.
*
* This file is part of Asbelos DCC API
*
* This is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* It is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with CommandStation. If not, see <https://www.gnu.org/licenses/>.
*/
#include <Arduino.h>
#include "WifiInboundHandler.h"
#include "RingStream.h"

View File

@ -287,6 +287,7 @@ wifiSerialState WifiInterface::setup2(const FSH* SSid, const FSH* password,
{
const byte MAX_IP_LENGTH=15;
char ipString[MAX_IP_LENGTH+1];
ipString[MAX_IP_LENGTH]='\0'; // protection against missing " character on end.
byte ipLen=0;
for(byte ipLen=0;ipLen<MAX_IP_LENGTH;ipLen++) {
while(!wifiStream->available());