Patch level :10.0 226
Files correlati :ba0 ba1 Ricompilazione Demo : [ ] Commento : 0001131: inst ptf 210 Descrizione se si aggiorna una versione di campo, alla fine della conversione, quando si preme il tasto fine viene visualizzato ' si è verificato un errore in ba1.exe. L'applicazione verrà chiusa. Il problema non si verifica in caso di nuova installazione. git-svn-id: svn://10.65.10.50/trunk@18190 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
117ac3c1b7
commit
8adba3b291
@ -52,6 +52,9 @@ protected:
|
|||||||
void delete_riga(long);
|
void delete_riga(long);
|
||||||
virtual bool extended_firm() const { return true; }
|
virtual bool extended_firm() const { return true; }
|
||||||
|
|
||||||
|
bool set_converting();
|
||||||
|
bool reset_converting();
|
||||||
|
|
||||||
bool recover(TSystemisamfile& f, int err);
|
bool recover(TSystemisamfile& f, int err);
|
||||||
void update();
|
void update();
|
||||||
void update_dir();
|
void update_dir();
|
||||||
@ -1437,12 +1440,11 @@ void TManutenzione_app::load_des()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TManutenzione_app::update()
|
bool TManutenzione_app::set_converting()
|
||||||
{
|
{
|
||||||
TIsamfile utenti(LF_USER);
|
TIsamfile utenti(LF_USER);
|
||||||
utenti.open(_excllock);
|
utenti.open(_excllock);
|
||||||
|
|
||||||
#ifndef DBG
|
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
while (!ok)
|
while (!ok)
|
||||||
{
|
{
|
||||||
@ -1461,13 +1463,14 @@ void TManutenzione_app::update()
|
|||||||
message.add(TR("Qualora uno degli utenti elencati non fosse effettivamente connesso, "));
|
message.add(TR("Qualora uno degli utenti elencati non fosse effettivamente connesso, "));
|
||||||
message.add(TR("effettuare una sua connessione e disconnessione immediata per sbloccarlo"));
|
message.add(TR("effettuare una sua connessione e disconnessione immediata per sbloccarlo"));
|
||||||
message.add(utonti);
|
message.add(utonti);
|
||||||
error_box(message);
|
if (is_power_station())
|
||||||
|
ok = yesno_box(message);
|
||||||
|
else
|
||||||
|
error_box(message);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
bool ok = true;
|
|
||||||
#endif
|
|
||||||
// Scrive CONVERTING solo dopo aver testato che non ci sia nessuno connesso
|
// Scrive CONVERTING solo dopo aver testato che non ci sia nessuno connesso
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
@ -1482,6 +1485,26 @@ void TManutenzione_app::update()
|
|||||||
}
|
}
|
||||||
|
|
||||||
utenti.close();
|
utenti.close();
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TManutenzione_app::reset_converting()
|
||||||
|
{
|
||||||
|
TLocalisamfile utenti(LF_USER);
|
||||||
|
// Azzera la scritta converting
|
||||||
|
utenti.put(USR_USERNAME, ::dongle().administrator());
|
||||||
|
bool ok = utenti.read(_isequal, _lock) == NOERR;
|
||||||
|
if (ok)
|
||||||
|
{
|
||||||
|
utenti.zero(USR_AUTSTR);
|
||||||
|
ok = utenti.rewrite() == NOERR;
|
||||||
|
}
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TManutenzione_app::update()
|
||||||
|
{
|
||||||
|
bool ok = set_converting();
|
||||||
if (!ok)
|
if (!ok)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1532,22 +1555,7 @@ void TManutenzione_app::update()
|
|||||||
else prefix().set(pref);
|
else prefix().set(pref);
|
||||||
load_des();
|
load_des();
|
||||||
|
|
||||||
ok = false;
|
reset_converting();
|
||||||
while (!ok)
|
|
||||||
{
|
|
||||||
utenti.open(_excllock);
|
|
||||||
ok = utenti.ok();
|
|
||||||
do_events();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Azzera la scritta converting
|
|
||||||
utenti.put(USR_USERNAME, ::dongle().administrator());
|
|
||||||
if (utenti.read() == NOERR)
|
|
||||||
{
|
|
||||||
utenti.zero(USR_AUTSTR);
|
|
||||||
utenti.rewrite();
|
|
||||||
}
|
|
||||||
utenti.close();
|
|
||||||
close_history();
|
close_history();
|
||||||
|
|
||||||
send_campo_xml(); // Spedisce situazione via ftp
|
send_campo_xml(); // Spedisce situazione via ftp
|
||||||
|
@ -216,27 +216,26 @@ bool save_campo_xml()
|
|||||||
|
|
||||||
// Aggiorna il file xml coi dati di installazione e lo spedisce qua
|
// Aggiorna il file xml coi dati di installazione e lo spedisce qua
|
||||||
bool send_campo_xml()
|
bool send_campo_xml()
|
||||||
{
|
{
|
||||||
TWait_cursor waiter;
|
bool ok = is_power_station();
|
||||||
bool ok = false;
|
|
||||||
|
|
||||||
#ifdef NDEBUG
|
if (!ok) // Non salvare attivazioni di prova interne
|
||||||
if (dongle().number() || !is_power_station()) // Non salvare attivazioni di prova interne
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (save_campo_xml())
|
|
||||||
{
|
{
|
||||||
if (xvt_net_get_status() & 0x7)
|
TWait_cursor waiter;
|
||||||
|
if (save_campo_xml())
|
||||||
{
|
{
|
||||||
TSocketClient aga;
|
if (xvt_net_get_status() & 0x7)
|
||||||
CONNID id = aga.QueryConnection("21", "www.aga.it");
|
|
||||||
if (id > 0)
|
|
||||||
{
|
{
|
||||||
TFilename local, remote;
|
TSocketClient aga;
|
||||||
build_xml_filename(local, false);
|
CONNID id = aga.QueryConnection("21", "www.aga.it");
|
||||||
build_xml_filename(remote, true);
|
if (id > 0)
|
||||||
ok = aga.FtpSendFile(id, remote, local, "attivazioni", "viagra");
|
{
|
||||||
aga.RemoveConnection(id);
|
TFilename local, remote;
|
||||||
|
build_xml_filename(local, false);
|
||||||
|
build_xml_filename(remote, true);
|
||||||
|
ok = aga.FtpSendFile(id, remote, local, "attivazioni", "viagra");
|
||||||
|
aga.RemoveConnection(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user