EgtMachKernel 2.4e3 :
- modifiche per prima versione chiave di rete.
This commit is contained in:
@@ -21,3 +21,4 @@
|
||||
std::string GetEMkVer( void) ;
|
||||
ILogger* GetEMkLogger( void) ;
|
||||
const std::string& GetEMkKey( void) ;
|
||||
bool GetEMkNetHwKey( void) ;
|
||||
|
||||
@@ -98,6 +98,7 @@ GetEMkLogger( void)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
static std::string s_sKey ;
|
||||
static bool s_bNetHwKey = false ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
@@ -106,9 +107,23 @@ SetEMkKey( const std::string& sKey)
|
||||
s_sKey = sKey ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
SetEMkNetHwKey( bool bNetHwKey)
|
||||
{
|
||||
s_bNetHwKey = bNetHwKey ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
const std::string&
|
||||
GetEMkKey( void)
|
||||
{
|
||||
return s_sKey ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
GetEMkNetHwKey( void)
|
||||
{
|
||||
return s_bNetHwKey ;
|
||||
}
|
||||
|
||||
Binary file not shown.
+12
-5
@@ -47,11 +47,18 @@ bool
|
||||
Generator::Run( const string& sCncFile, const string& sInfo)
|
||||
{
|
||||
// verifico sia abilitato dalla licenza
|
||||
unsigned int nOpt1, nOpt2 ;
|
||||
int nOptExpDays ;
|
||||
int nRet = GetKeyOptions( GetEMkKey(), KEY_BASELIB_PROD, KEY_BASELIB_VER, KEY_BASELIB_LEV,
|
||||
nOpt1, nOpt2, nOptExpDays) ;
|
||||
if ( nRet == KEY_OK && ( nOpt1 & KEYOPT_EMK_NC_OFF) == 0) {
|
||||
bool bEnabled = false ;
|
||||
if ( GetEMkNetHwKey()) {
|
||||
bEnabled = true ;
|
||||
}
|
||||
else {
|
||||
unsigned int nOpt1, nOpt2 ;
|
||||
int nOptExpDays ;
|
||||
int nRet = GetKeyOptions( GetEMkKey(), KEY_BASELIB_PROD, KEY_BASELIB_VER, KEY_BASELIB_LEV,
|
||||
nOpt1, nOpt2, nOptExpDays) ;
|
||||
bEnabled = ( nRet == KEY_OK && ( nOpt1 & KEYOPT_EMK_NC_OFF) == 0) ;
|
||||
}
|
||||
if ( bEnabled) {
|
||||
|
||||
// emetto info di log
|
||||
{ string sOut = "Generator Run : " + sCncFile ;
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ IMachMgr*
|
||||
CreateMachMgr( void)
|
||||
{
|
||||
// verifico la chiave e le opzioni
|
||||
if ( ! TestKeyForEMk( GetEMkKey(), 0, GetEMkLogger()))
|
||||
if ( ! GetEMkNetHwKey() && ! TestKeyForEMk( GetEMkKey(), 0, GetEMkLogger()))
|
||||
return nullptr ;
|
||||
// creo il MachMgr
|
||||
return static_cast<IMachMgr*> ( new(nothrow) MachMgr) ;
|
||||
|
||||
Reference in New Issue
Block a user