diff --git a/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer b/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer index 3878acc84..b389ffb25 100755 Binary files a/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer and b/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer differ diff --git a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c index c56c51af0..ac79cc752 100644 --- a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c @@ -1079,8 +1079,8 @@ int checkDetectorType() { return -1; } int type = atoi(buffer); - if (type > TYPE_TOLERANCE) { - FILE_LOG(logERROR, ("No Module attached! Expected %d for Mythen3, got %d\n", TYPE_MYTHEN3_MODULE_VAL, type)); + if (type > TYPE_NO_MODULE_STARTING_VAL) { + FILE_LOG(logERROR, ("No Module attached! Expected %d for Mythen, got %d\n", TYPE_MYTHEN3_MODULE_VAL, type)); return -2; } diff --git a/slsSupportLib/include/network_utils.h b/slsSupportLib/include/network_utils.h index faa2f3625..ca90002bc 100755 --- a/slsSupportLib/include/network_utils.h +++ b/slsSupportLib/include/network_utils.h @@ -40,8 +40,8 @@ class MacAddr { public: constexpr MacAddr() noexcept = default; explicit constexpr MacAddr(uint64_t mac) noexcept : addr_{mac} {} - MacAddr(std::string mac); - MacAddr(const char *address); + explicit MacAddr(std::string mac); + explicit MacAddr(const char *address); std::string str() const; std::string hex() const; constexpr bool operator==(const MacAddr &other) const noexcept { diff --git a/slsSupportLib/include/versionAPI.h b/slsSupportLib/include/versionAPI.h index 7c506e2b9..4530378fe 100644 --- a/slsSupportLib/include/versionAPI.h +++ b/slsSupportLib/include/versionAPI.h @@ -8,5 +8,5 @@ #define APIJUNGFRAU 0x191127 #define APICTB 0x191210 #define APIEIGER 0x200110 -#define APIMYTHEN3 0x200115 +#define APIMYTHEN3 0x200120 #define APIGOTTHARD2 0x200116 diff --git a/slsSupportLib/src/network_utils.cpp b/slsSupportLib/src/network_utils.cpp index a5630eb4e..2a55ab8ed 100755 --- a/slsSupportLib/src/network_utils.cpp +++ b/slsSupportLib/src/network_utils.cpp @@ -136,7 +136,7 @@ MacAddr InterfaceNameToMac(const std::string& inf) { if (-1==ioctl(sock, SIOCGIFHWADDR, &ifr)) { perror("ioctl(SIOCGIFHWADDR) "); - return std::string("00:00:00:00:00:00"); + return MacAddr{}; } for (int j=0, k=0; j<6; j++) { k+=snprintf(mac+k, mac_len-k-1, j ? ":%02X" : "%02X", diff --git a/slsSupportLib/tests/test-network_utils.cpp b/slsSupportLib/tests/test-network_utils.cpp index 94b8fc1e2..33757d64c 100755 --- a/slsSupportLib/tests/test-network_utils.cpp +++ b/slsSupportLib/tests/test-network_utils.cpp @@ -22,8 +22,8 @@ TEST_CASE("Convert mac address using classes", "[support]") { CHECK(mac0 == vec_addr[i]); CHECK(mac1 == vec_addr[i]); - CHECK(mac0 == vec_ans[i]); - CHECK(mac1 == vec_ans[i]); + CHECK(mac0.str() == vec_ans[i]); + CHECK(mac1.str() == vec_ans[i]); CHECK(mac0.str() == vec_ans[i]); CHECK(mac1.str() == vec_ans[i]); } @@ -59,8 +59,8 @@ TEST_CASE("Convert IP using classes ", "[support]") { CHECK(ip0 == ip1); CHECK(ip0 == vec_addr[i]); CHECK(ip1 == vec_addr[i]); - CHECK(ip0 == vec_ans[i]); - CHECK(ip1 == vec_ans[i]); + CHECK(ip0.str() == vec_ans[i]); + CHECK(ip1.str() == vec_ans[i]); CHECK(ip0.str() == vec_ans[i]); CHECK(ip0.arr().data() == vec_ans[i]); CHECK(ip1.str() == vec_ans[i]);