diff --git a/CMakeLists.txt b/CMakeLists.txt index 5f72081e8..4a9088011 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,3 +125,7 @@ endif(BUILD_CENTRAL_CONTROLLER) add_executable(${PROJECT_NAME} ${src} ${headers}) target_link_libraries(${PROJECT_NAME} ${libs}) + + +add_executable(zerotier-selftest selftest.cpp) +target_link_libraries(zerotier-selftest ${libs}) diff --git a/Jenkinsfile b/Jenkinsfile index 457210adc..455115cb4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,10 +14,12 @@ parallel 'centos7': { checkout scm stage('Build Centos 7') { - sh '''rm -rf build/ + sh '''. /opt/rh/devtoolset-8/enable + rm -rf build/ mkdir build && cd build - CC=clang CXX=clang++ cmake .. + cmake .. make -j4 + ./zerotier-selftest ''' } } diff --git a/node/Identity.cpp b/node/Identity.cpp index 83800384e..f54d90e67 100644 --- a/node/Identity.cpp +++ b/node/Identity.cpp @@ -243,7 +243,7 @@ char *Identity::toString(bool includePrivate,char buf[ZT_IDENTITY_STRING_BUFFER_ } *p = (char)0; return buf; - } + } break; case P384: { char *p = buf; Utils::hex10(_address.toInt(),p); @@ -262,6 +262,7 @@ char *Identity::toString(bool includePrivate,char buf[ZT_IDENTITY_STRING_BUFFER_ return buf; } break; } + return nullptr; } bool Identity::fromString(const char *str)