Salome HOME
Get the error message in case license is not valid
authorChristophe Bourcier <christophe.bourcier@cea.fr>
Thu, 27 Apr 2023 13:09:35 +0000 (15:09 +0200)
committerChristophe Bourcier <christophe.bourcier@cea.fr>
Thu, 27 Apr 2023 13:09:35 +0000 (15:09 +0200)
src/HexoticPlugin/HexoticPlugin_Hexotic.cxx

index 4c6ec601551f1b1eb749cba2a959241172d07a52..0a20fd972ea1cca5a5cbf1e4e214ed8bec47e9c4 100644 (file)
@@ -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() )