Patch level : 12.0 476

Files correlati     : 
Commento            : Aggiunta funzione is_debug_station() per verificare se è stato abilitato il debug su campo

git-svn-id: svn://10.65.10.50/branches/R_10_00@24178 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
mtollari 2017-11-08 10:45:17 +00:00
parent d59df865e3
commit a1d194d2f5
3 changed files with 25 additions and 1 deletions

View File

@ -2944,6 +2944,7 @@ const char* TDate_field::win2raw(
// @flag ANGELO | Lunedi' dell'angelo
// @flag NATALE | Giorno di natale (25-12-aa)
// @flag ULTIMO | Ultimo giorno dell'anno (31-12-aa)
// @flag TOLLA | It's magic!
{
TString& s = _ctl_data._park;
s = datum; s.trim();
@ -3030,6 +3031,12 @@ const char* TDate_field::win2raw(
g.set_month(12);
g.set_day(31);
} else
if (s == "TOLLA")
{
g.set_day(19);
g.set_month(06);
g.set_year(1994)
} else
if (s[0] != 'O') // s != "OGGI"
ok = false;
if (ok)

View File

@ -5,6 +5,7 @@
#include <dongle.h>
#include <progind.h>
#include <utility.h>
#include <config.h>
///////////////////////////////////////////////////////////
// TPerformance_profiler
@ -606,13 +607,27 @@ long daytime()
// DON'T cache this bool because hostname can be local or server
static bool is_sirio_station(const char* hostname)
{
const char* const ranger[] = { "NBKCORRADIW81", "NBKDELLI7TOLLAR", "MOBILE", "PCTRUFFELLI", "SPOCK", "ARCHIMEDE", NULL };
const char* const ranger[] =
{
"NBKI7HPFERRANDI", // Davide
"NBKDELLI7TOLLAR", // Mattia
"MOBILE", // Roberto
"SPOCK", // Alessandro ?
"ARCHIMEDE", // Alessandro
NULL
};
for (int i = 0; ranger[i]; i++)
if (xvt_str_same(hostname, ranger[i]))
return true;
return false;
}
bool is_debug_station()
{
const TString& host = get_hostname();
return is_sirio_station(host) || xvt_str_same(host, "GIARDINI") || ini_get_int(CONFIG_INSTALL, "DEBUG", "LEVEL", 0) > 0;
}
bool is_power_station()
{
static BOOLEAN ps = -1;

View File

@ -12,6 +12,7 @@
#define STRINGIFY(x) #x
#define TOSTRING(x) STRINGIFY(x)
#define SAFE_DELETE(p) { delete p; p = NULL; }
#define DEBUG_ENABLED is_debug_station()
class TPerformance_profiler : public TObject
{
@ -58,6 +59,7 @@ const char* unesc(const char* str); // Trasforma i caratteri '\n' nella sequenza
istream& eatwhite (istream& i);
const TString& get_hostname();
bool is_debug_station();
bool is_power_station();
bool is_power_reseller(bool power_user_only = false);
long daytime();