From d69dbb60b72841eab011c4dd84b2f7f7ba742795 Mon Sep 17 00:00:00 2001 From: Christophe Bourcier Date: Thu, 27 Apr 2023 15:09:35 +0200 Subject: [PATCH 1/1] Get the error message in case license is not valid --- src/HexoticPlugin/HexoticPlugin_Hexotic.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx b/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx index 4c6ec60..0a20fd9 100644 --- a/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx +++ b/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx @@ -1140,10 +1140,16 @@ bool HexoticPlugin_Hexotic::Compute(SMESH_Mesh& aMesh, else { // get problem description from the log file - char msgLic[] = " Dlim "; + char msgLic1[] = "connection to server failed"; + char msgLic2[] = " Dlim "; + char msgLic3[] = "license is not valid"; const char* fileBeg = &log[0], *fileEnd = fileBeg + log.size(); - if ( std::search( fileBeg, fileEnd, msgLic, msgLic+strlen(msgLic)) != fileEnd ) - error("Licence problems."); + if ( std::search( fileBeg, fileEnd, msgLic1, msgLic1+strlen(msgLic1)) != fileEnd || + std::search( fileBeg, fileEnd, msgLic2, msgLic2+strlen(msgLic2)) != fileEnd + ) + error("Network license problem."); + else if ( std::search( fileBeg, fileEnd, msgLic3, msgLic3 + strlen(msgLic3)) != fileEnd ) + error("License is not valid."); } } else if ( !errStr.empty() ) -- 2.30.2