check also read ip from file if valid

This commit is contained in:
lukas 2020-05-05 19:15:08 +02:00
parent a3c8fe44dd
commit 1756b0cf5e

View File

@ -4,6 +4,7 @@
#include <fstream>
#include <iostream>
#include <climits>
#include "FileLogger.h"
@ -24,5 +25,9 @@ std::string FileLogger::readip() {
in >> ip;
// when received ip has no : return 0.0.0.0
if (ip.find(':') == ULONG_MAX)
return "0.0.0.0";
else
return ip;
}