EgtExecutor 2.6a2 :
- aggiunta ExeGetKeyAssLeftDays per avere il numero di giorni mancanti al termine dell'assistenza.
This commit is contained in:
+12
-3
@@ -52,6 +52,7 @@ static string s_sKey ;
|
||||
static int s_nKeyType = KEY_LOCK_TYPE_ANY ;
|
||||
static bool s_bNetHwKey = false ;
|
||||
static int s_nKeyExpDays = 0 ;
|
||||
static int s_nKeyAssExpDays = 0 ;
|
||||
static int s_nKeyOptExpDays = 0 ;
|
||||
static string s_sNestKey ;
|
||||
static string s_sLockId ;
|
||||
@@ -519,7 +520,7 @@ bool
|
||||
ExeGetKeyLevel( int nProd, int nVer, int nLev, int& nKLev)
|
||||
{
|
||||
// verifico la chiave e il livello
|
||||
int nRet = GetKeyLevel( s_sKey, nProd, nVer, nLev, nKLev, s_nKeyExpDays) ;
|
||||
int nRet = GetKeyLevelEx( s_sKey, nProd, nVer, nLev, nKLev, s_nKeyExpDays, s_nKeyAssExpDays) ;
|
||||
SetEGnKeyLevel( nRet, nKLev, s_nKeyExpDays) ;
|
||||
if ( nRet != KEY_OK) {
|
||||
string sErr = "Error on Key (EGKL/" + ToString( nRet) + ")" ;
|
||||
@@ -527,7 +528,6 @@ ExeGetKeyLevel( int nProd, int nVer, int nLev, int& nKLev)
|
||||
nKLev = - nRet ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
@@ -551,7 +551,6 @@ ExeGetKeyOptions( int nProd, int nVer, int nLev, unsigned int& nOpt2)
|
||||
LOG_ERROR( s_pGenLog, sErr.c_str()) ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
@@ -565,6 +564,16 @@ ExeGetKeyLeftDays( int& nLeftDays)
|
||||
return true ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeGetKeyAssLeftDays( int& nAssLeftDays)
|
||||
{
|
||||
if ( s_nKeyAssExpDays == 0)
|
||||
return false ;
|
||||
nAssLeftDays = s_nKeyAssExpDays - GetCurrDay() ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeGetKeyOptLeftDays( int& nOptLeftDays)
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user