Patch level :

Files correlati     :
Ricompilazione Demo : [ ]
Commento            : Riportata la R_98_01_03pl40 sul main trunk


git-svn-id: svn://10.65.10.50/trunk@6700 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1998-05-28 07:31:27 +00:00
parent 740a06d957
commit ca9c5a6b32

View File

@ -70,11 +70,13 @@ bool destroy_dongle()
delete _dongle; delete _dongle;
_dongle = NULL; _dongle = NULL;
#ifndef _DEMO_
if (_eutron_key) if (_eutron_key)
{ {
delete _eutron_key; delete _eutron_key;
_eutron_key = NULL; _eutron_key = NULL;
} }
#endif // _DEMO_
} }
return ok; return ok;
} }
@ -230,7 +232,8 @@ bool TDongle::hardlock_login(bool test_all_keys)
{ {
if (data[0] == 0x3283 || data[0] == 0xA3AA) // chiave programmatori !! if (data[0] == 0x3283 || data[0] == 0xA3AA) // chiave programmatori !!
{ {
_type = _developer_dongle; if (_type == _user_dongle)
_type = _developer_dongle;
_serno = 0; _serno = 0;
} }
} }
@ -427,7 +430,7 @@ bool TDongle::login(bool test_all_keys)
#ifdef _DEMO_ #ifdef _DEMO_
_hardware = _dongle_hardlock; _hardware = _dongle_hardlock;
_type = _dongle_user; _type = _user_dongle;
_serno = 0; _serno = 0;
_max_users = 1; _max_users = 1;
_last_update = TDate(TODAY); _last_update = TDate(TODAY);
@ -437,12 +440,28 @@ bool TDongle::login(bool test_all_keys)
#else #else
if (_type != _no_dongle) // Already logged in if (_type != _no_dongle) // Already logged in
logout(); logout();
if (_hardware == _dongle_unknown || _hardware == _dongle_hardlock) TConfig ini("prawin.ini", "Main");
const TDongleHardware hw = (TDongleHardware)ini.get_int("Donglehw");
if (_hardware == _dongle_unknown && (hw ==_dongle_hardlock || hw ==_dongle_eutron))
_hardware = hw ; // ...presets hardware types only for LOCAL dongles ...
if (_hardware == _dongle_hardlock || _hardware == _dongle_unknown )
ok = hardlock_login(test_all_keys); ok = hardlock_login(test_all_keys);
if (_hardware == _dongle_unknown || _hardware == _dongle_eutron) if (_hardware == _dongle_eutron || _hardware == _dongle_unknown )
ok = eutron_login(test_all_keys); ok = eutron_login(test_all_keys);
if (_hardware == _dongle_unknown || _hardware == _dongle_network) if (_hardware == _dongle_network || _hardware == _dongle_unknown)
ok = network_login(test_all_keys); ok = network_login(test_all_keys);
if (!ok && hw != _dongle_unknown)
{
// retry login for various dongles ...
if (hw != _dongle_eutron)
ok = eutron_login(test_all_keys);
if (!ok && hw != _dongle_hardlock)
ok = hardlock_login(test_all_keys);
if (!ok && hw != _dongle_network)
ok = network_login(test_all_keys);
}
if (_hardware != hw)
ini.set("Donglehw",(int)(ok ? _hardware:_dongle_unknown));
#endif #endif
return ok; return ok;
} }
@ -630,7 +649,7 @@ bool TDongle::burn_eutron()
memset(eh, 0, sizeof(TEutronHeader)); memset(eh, 0, sizeof(TEutronHeader));
_last_update = TDate(TODAY); _last_update = TDate(TODAY);
sprintf(eh->_serno, "%lu", _serno); sprintf(eh->_serno, "%lu", (unsigned long)_serno);
eh->_year_assist = _year_assist; eh->_year_assist = _year_assist;
eh->_max_users = _max_users; eh->_max_users = _max_users;
eh->_last_date = atol(_last_update.string(ANSI)); eh->_last_date = atol(_last_update.string(ANSI));