From 6737785388f2e1e7be5e79a025fadc0e84a80702 Mon Sep 17 00:00:00 2001 From: Asbelos Date: Mon, 8 Feb 2021 12:28:16 +0000 Subject: [PATCH] Comments and a reliability fix. --- WifiInboundHandler.cpp | 19 +++++++++++++++++++ WifiInterface.cpp | 1 + 2 files changed, 20 insertions(+) diff --git a/WifiInboundHandler.cpp b/WifiInboundHandler.cpp index 2463921..67f68e3 100644 --- a/WifiInboundHandler.cpp +++ b/WifiInboundHandler.cpp @@ -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 . + */ #include #include "WifiInboundHandler.h" #include "RingStream.h" diff --git a/WifiInterface.cpp b/WifiInterface.cpp index bcdc2c7..6735f1a 100644 --- a/WifiInterface.cpp +++ b/WifiInterface.cpp @@ -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;ipLenavailable());