Eliminata gestione lock errata che bloccava elaborazione
git-svn-id: svn://10.65.10.50/branches/R_10_00@23091 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
10e094b7e8
commit
f69454010a
@ -116,10 +116,10 @@ static bool matura_func(const TRelation& rel, void* pJolly)
|
||||
return true;
|
||||
|
||||
const int anno = rec.get_int(PROV_ANNO);
|
||||
const TString& codnum(rec.get(PROV_CODNUM)) ;
|
||||
const TString4 codnum(rec.get(PROV_CODNUM)) ;
|
||||
const long ndoc = rec.get_long(PROV_NDOC);
|
||||
|
||||
TString80 key; key.format("D|%d|%s|%ld", anno, (const char *) codnum, ndoc);
|
||||
TString80 key; key.format("D|%d|%s|%ld", anno, (const char*)codnum, ndoc);
|
||||
const long nreg = atol(cache().get(LF_DOC, key, DOC_NUMREG));
|
||||
if (nreg <= 0)
|
||||
return true; // nessuna partita???
|
||||
@ -137,6 +137,7 @@ static bool matura_func(const TRelation& rel, void* pJolly)
|
||||
for (int nriga = part->last(); nriga > 0 && !changed_record; nriga = part->pred(nriga))
|
||||
{
|
||||
const TRiga_partite& r = part->riga(nriga);
|
||||
|
||||
if (check_insoluti && r.tipo() >= tm_insoluto)
|
||||
{
|
||||
const TDate data_insoluto = r.get(PART_DATAREG);
|
||||
@ -212,12 +213,7 @@ static bool matura_func(const TRelation& rel, void* pJolly)
|
||||
if (changed_record)
|
||||
{
|
||||
TLocalisamfile& provv = rel.lfile(LF_PROVV);
|
||||
int err = provv.reread(_lock);
|
||||
if (err == NOERR)
|
||||
{
|
||||
provv.curr() = rec;
|
||||
err = rec.rewrite(provv);
|
||||
}
|
||||
int err = rec.rewrite(provv);
|
||||
if (err != NOERR)
|
||||
return yesno_box(FR("Errore %d in aggioramento agente %ld, Continuare ugualmente"), err, rec.get_long(PROV_CODAGE));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user