From 4972385cec991fe7654ff16b88b367deb468217b Mon Sep 17 00:00:00 2001 From: luca Date: Fri, 23 Sep 2011 08:27:52 +0000 Subject: [PATCH] Patch level : Files correlati : agalib Ricompilazione Demo : [ ] Commento : Corretta gestione chiavi sospese git-svn-id: svn://10.65.10.50/branches/R_10_00@22425 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/dongle.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/include/dongle.cpp b/include/dongle.cpp index 3f172aac9..615612aee 100755 --- a/include/dongle.cpp +++ b/include/dongle.cpp @@ -1375,23 +1375,18 @@ int Tdninst::check_customer() const if (em.ok() && em.year_assist() > 2100 && em.find_serno(serno)) { error = 0; - const TDate oggi(TODAY); TToken_string l(80, '='); - TString16 str; - TDate ds; while (em.line(l) && error == 0) { if (l.empty() || l[0] == '[') break; - if (parse_date(l, str, ds)) + if (l[0]=='*' || l.starts_with("MustCall")) { - if (ds >= oggi) - { - if (str == "*") - error = 2; else - if (str == "MustCall") - error = 1; - } + const TDate oggi(TODAY); + TString16 str; + TDate ds; + if (parse_date(l, str, ds) && oggi >= ds) + error = (l[0] == '*') ? 2 : 1; } } }