EgtGeneral 2.5j1 :

- ricompilazione per chiavi di rete esposte su Internet
- aggiunta funzione GetLockIdStringNetData.
This commit is contained in:
Dario Sassi
2023-10-09 10:47:54 +02:00
parent 6a80132b00
commit febee7ba17
2 changed files with 22 additions and 0 deletions
+22
View File
@@ -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 ;
}