Patch level : 10.0
Files correlati : Ricompilazione Demo : [ ] Commento : Attivata la possibilità di aggiornare l'anno di assistenza su di un server remoto git-svn-id: svn://10.65.10.50/branches/R_10_00@21359 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
a0d4f678d9
commit
0f930a1600
@ -144,6 +144,7 @@ void TRequest_form::update_serno(const TString& num)
|
|||||||
const char* hw = "";
|
const char* hw = "";
|
||||||
switch (::dongle().hardware())
|
switch (::dongle().hardware())
|
||||||
{
|
{
|
||||||
|
case _dongle_aladdin : hw = "ALADDIN"; break;
|
||||||
case _dongle_hardlock: hw = "HARDLOCK"; break;
|
case _dongle_hardlock: hw = "HARDLOCK"; break;
|
||||||
default: hw = "EUTRON"; break;
|
default: hw = "EUTRON"; break;
|
||||||
}
|
}
|
||||||
@ -931,14 +932,6 @@ bool TAttivazione_moduli::create()
|
|||||||
if (!ok)
|
if (!ok)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (d.hardware() == _dongle_network)
|
|
||||||
{
|
|
||||||
if (is_power_station())
|
|
||||||
warning_box(TR("Non è consigliabile usare questo programma mentre e' in funzione il server di autorizzazioni"));
|
|
||||||
else
|
|
||||||
return error_box(TR("Questo programma non puo' funzionare mentre e' in funzione il server di autorizzazioni"));
|
|
||||||
}
|
|
||||||
|
|
||||||
ok = !dongle_update_needed();
|
ok = !dongle_update_needed();
|
||||||
if (!ok)
|
if (!ok)
|
||||||
{
|
{
|
||||||
@ -947,6 +940,20 @@ bool TAttivazione_moduli::create()
|
|||||||
return false; // Aggiornamento automatico riuscito!
|
return false; // Aggiornamento automatico riuscito!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (d.hardware() == _dongle_network)
|
||||||
|
{
|
||||||
|
if (yesno_box(TR("Questo programma non puo' essere utilizzato in quanto e' in funzione il server di autorizzazioni.\n"
|
||||||
|
"Si desidera connettersi al server per effettuare le operazioni di attivazione?")))
|
||||||
|
{
|
||||||
|
TString server = ini_get_string(CONFIG_INSTALL, "Server", "Dongle");
|
||||||
|
if (server.find(':') < 0)
|
||||||
|
server << ":1883";
|
||||||
|
server.insert("http://");
|
||||||
|
xvt_sys_goto_url(server, "open");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
_im = new TInformazione_moduli;
|
_im = new TInformazione_moduli;
|
||||||
|
|
||||||
disable_menu_item(M_FILE_NEW);
|
disable_menu_item(M_FILE_NEW);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include <applicat.h>
|
#include <applicat.h>
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <dongle.h>
|
#include <dongle.h>
|
||||||
|
#include <isamrpc.h>
|
||||||
#include <modaut.h>
|
#include <modaut.h>
|
||||||
#include <scanner.h>
|
#include <scanner.h>
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
@ -67,8 +68,7 @@ bool update_dninst(bool force)
|
|||||||
bool update_assistance_year()
|
bool update_assistance_year()
|
||||||
{
|
{
|
||||||
TDongle& donkey = dongle();
|
TDongle& donkey = dongle();
|
||||||
if (donkey.hardware() == _dongle_network)
|
const bool remote = donkey.hardware() == _dongle_network;
|
||||||
return show_error(TR("Il server di autorizzazioni deve essere disattivato"));
|
|
||||||
|
|
||||||
update_dninst(true);
|
update_dninst(true);
|
||||||
|
|
||||||
@ -81,24 +81,32 @@ bool update_assistance_year()
|
|||||||
//...validi dentro il dninst.zip
|
//...validi dentro il dninst.zip
|
||||||
if (dninst_year > donkey.year_assist())
|
if (dninst_year > donkey.year_assist())
|
||||||
{
|
{
|
||||||
const int serno = get_serial_number();
|
// Cerca il numero di serie e gli "eventuali" moduli da disattivare
|
||||||
TToken_string to_be_killed;
|
TToken_string to_be_killed;
|
||||||
if (dninst.find_killed(to_be_killed))
|
if (dninst.find_killed(to_be_killed))
|
||||||
{
|
{
|
||||||
donkey.set_year_assist(dninst_year);
|
donkey.set_year_assist(dninst_year);
|
||||||
FOR_EACH_TOKEN(to_be_killed, mod)
|
FOR_EACH_TOKEN(to_be_killed, mod) if (strlen(mod) == 2)
|
||||||
{
|
|
||||||
if (strlen(mod) == 2)
|
|
||||||
{
|
{
|
||||||
const word aut = donkey.module_name2code(mod);
|
const word aut = donkey.module_name2code(mod);
|
||||||
if (aut > BAAUT && aut < ENDAUT)
|
if (aut > BAAUT && aut < ENDAUT)
|
||||||
|
{
|
||||||
donkey.deactivate(aut);
|
donkey.deactivate(aut);
|
||||||
|
if (remote)
|
||||||
|
rpc_DongleModuleActivate(aut, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (donkey.burn())
|
|
||||||
return true; // Complimenti,la chiavetta e' presente nella lista e sara' aggiornato l'anno di assistenza
|
bool done = false;
|
||||||
|
if (remote)
|
||||||
|
done = rpc_DongleYearActivate(dninst_year);
|
||||||
else
|
else
|
||||||
return show_error(FR("Errore di scrittura sulla chiave di protezione"));
|
done = donkey.burn();
|
||||||
|
|
||||||
|
if (done)
|
||||||
|
return true; // Complimenti, la chiavetta e' presente nella lista ed e' stato aggiornata l'assistenza
|
||||||
|
else
|
||||||
|
return show_error(TR("Errore di aggiornamento della chiave di protezione"));
|
||||||
} //if(sn==serno...
|
} //if(sn==serno...
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user