EgtGeneral 2.5j1 :
- ricompilazione per chiavi di rete esposte su Internet - aggiunta funzione GetLockIdStringNetData.
This commit is contained in:
@@ -142,3 +142,25 @@ GetLockIdStringInfo( const string& sLockId, int& nKeyType, bool& bNetKey, int& n
|
||||
return true ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
GetLockIdStringNetData( const string& sLockId, string& sAddrPort)
|
||||
{
|
||||
// default niente
|
||||
sAddrPort = "" ;
|
||||
|
||||
// se chiave software
|
||||
if ( sLockId.find( KEY_LOCK_HW_START) != 0)
|
||||
return true ;
|
||||
|
||||
// le chiavi hardware possono avere una stringa con indirizzo e porta dopo il carattere '@'
|
||||
STRVECTOR vsTok ;
|
||||
Tokenize( sLockId, "@", vsTok) ;
|
||||
if ( vsTok.size() == 2) {
|
||||
sAddrPort = vsTok[1] ;
|
||||
Trim( sAddrPort) ;
|
||||
}
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user