Patch level : 10.0

Files correlati     : xvaga
Ricompilazione Demo : [ ]
Commento            :
Supporto nuova release SSA


git-svn-id: svn://10.65.10.50/branches/R_10_00@22606 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2012-03-09 15:48:30 +00:00
parent 4b3a4344c9
commit ef4b34f000
2 changed files with 9 additions and 8 deletions

View File

@ -1,11 +1,12 @@
#include "wxinc.h" #include "wxinc.h"
#include "xvt.h" #include "xvt.h"
#include "../../ssa/h/ssadll.h" #include "../../ssa/h/ssadll.h"
#include "../../ssa/h/ssaerr.h"
#define SSA_MOD_NOTFOUND -201 //#define SSA_MOD_NOTFOUND -201
#define SSA_NO_LOGIN -301 //#define SSA_NO_LOGIN -301
static int _ssa_serial = SSA_NO_LOGIN; static int _ssa_serial = SSA_UTENTE_NON_LOGGATO;
static wxString _ssa_module; static wxString _ssa_module;
static const char* xvt_dongle_sa_id() static const char* xvt_dongle_sa_id()
@ -30,7 +31,7 @@ int xvt_dongle_sa_login(const char* module)
{ {
err = SSA_Login(xvt_dongle_sa_id(), "Campo"); err = SSA_Login(xvt_dongle_sa_id(), "Campo");
if (err == 0) if (err == 0)
err = _ssa_serial = SSA_GetNumeroSerie("Campo"); err = _ssa_serial = SSA_NumeroSerie("Campo");
} }
if (_ssa_serial >= 0 && module && *module) if (_ssa_serial >= 0 && module && *module)
@ -50,7 +51,7 @@ int xvt_dongle_sa_login(const char* module)
int xvt_dongle_sa_crypt(unsigned short* data) int xvt_dongle_sa_crypt(unsigned short* data)
{ {
if (_ssa_serial < 0) if (_ssa_serial < 0)
return SSA_NO_LOGIN; return SSA_UTENTE_NON_LOGGATO;
if (data == NULL) if (data == NULL)
return -ENOMEM; return -ENOMEM;
data[0] ^= 0xDEAD; data[0] ^= 0xDEAD;
@ -62,7 +63,7 @@ int xvt_dongle_sa_crypt(unsigned short* data)
int xvt_dongle_sa_logout(const char* module) int xvt_dongle_sa_logout(const char* module)
{ {
int err = SSA_NO_LOGIN; int err = SSA_UTENTE_NON_LOGGATO;
if (_ssa_serial >= 0) if (_ssa_serial >= 0)
{ {
if (module && *module) if (module && *module)
@ -80,7 +81,7 @@ int xvt_dongle_sa_logout(const char* module)
err = SSA_Logout(xvt_dongle_sa_id(), "Campo"); err = SSA_Logout(xvt_dongle_sa_id(), "Campo");
if (err == 0) if (err == 0)
{ {
_ssa_serial = SSA_NO_LOGIN; _ssa_serial = SSA_UTENTE_NON_LOGGATO;
_ssa_module.Empty(); _ssa_module.Empty();
} }
} }

View File

@ -89,7 +89,7 @@ void TMessageBox::OnButton(wxCommandEvent& evt)
wxTheClipboard->Close(); wxTheClipboard->Close();
return; // DO NOT EXIT return; // DO NOT EXIT
case wxID_SAVEAS: case wxID_SAVEAS:
xvt_mail_send("assistenza@sirio-is.it", NULL, NULL, _GetAppTitle(), GetMessage(), NULL, 1); xvt_mail_send("hotline@sirio-is.it", NULL, NULL, _GetAppTitle(), GetMessage(), NULL, 1);
return; // DO NOT EXIT return; // DO NOT EXIT
default: ec = GetEscapeId(); break; default: ec = GetEscapeId(); break;
} }