From 742d4e6cb7b8f73040da05a24df4cb9383fcd131 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Fri, 2 Nov 2018 14:13:59 +0100 Subject: [PATCH] bug fix for mac addr format check --- slsDetectorSoftware/slsDetector/slsDetector.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index 1886f08b0..bdae6a382 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -2872,8 +2872,8 @@ std::string slsDetector::setDetectorMAC(std::string detectorMAC) { // invalid format if ((detectorMAC.length() != 17) || - (detectorMAC[2] == ':') || (detectorMAC[5] == ':') || (detectorMAC[8] == ':') || - (detectorMAC[11] == ':') ||(detectorMAC[14] == ':')) { + (detectorMAC[2] != ':') || (detectorMAC[5] != ':') || (detectorMAC[8] != ':') || + (detectorMAC[11] != ':') ||(detectorMAC[14] != ':')) { setErrorMask((getErrorMask())|(COULDNOT_SET_NETWORK_PARAMETER)); FILE_LOG(logERROR) << "server MAC Address should be in xx:xx:xx:xx:xx:xx format"; } @@ -3042,8 +3042,8 @@ std::string slsDetector::setReceiverUDPIP(std::string udpip) { std::string slsDetector::setReceiverUDPMAC(std::string udpmac) { // invalid format if ((udpmac.length() != 17) || - (udpmac[2] == ':') || (udpmac[5] == ':') || (udpmac[8] == ':') || - (udpmac[11] == ':') ||(udpmac[14] == ':')) { + (udpmac[2] != ':') || (udpmac[5] != ':') || (udpmac[8] != ':') || + (udpmac[11] != ':') ||(udpmac[14] != ':')) { setErrorMask((getErrorMask())|(COULDNOT_SET_NETWORK_PARAMETER)); FILE_LOG(logERROR) << "receiver udp MAC Address should be in xx:xx:xx:xx:xx:xx format"; }