Patch level :2.0 nopatch
Files correlati :agalib Ricompilazione Demo : [ ] Commento :sistemata variabile nel metodo is_valid;la DB_reclen(fhnd) necessitava di fhnd come argomento (come tutte le altre funzioni di CB6) git-svn-id: svn://10.65.10.50/trunk@10238 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
f9212a2435
commit
26f36fbc78
@ -1275,20 +1275,21 @@ int TBaseisamfile::is_valid()
|
|||||||
CHECKD(_isam_handle == 0, "Can't reopen file ", _logicnum);
|
CHECKD(_isam_handle == 0, "Can't reopen file ", _logicnum);
|
||||||
TFilename filename;
|
TFilename filename;
|
||||||
TIsam_handle isam_handle = prefix().open_isamfile(_logicnum, filename, FALSE, TRUE);
|
TIsam_handle isam_handle = prefix().open_isamfile(_logicnum, filename, FALSE, TRUE);
|
||||||
int err= isam_handle > 0 ? prefix().get_handle(isam_handle,1) : -60;
|
TCodeb_handle fhnd = isam_handle > 0 ? prefix().get_handle(isam_handle,1) : -60;
|
||||||
if (err < 0)
|
|
||||||
err = get_error(err);
|
int err = NOERR;
|
||||||
|
if (fhnd < 0)
|
||||||
|
err = get_error(fhnd);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const int trcreclen = prefix().get_reclen(_logicnum);
|
const int trcreclen = prefix().get_reclen(_logicnum);
|
||||||
if (trcreclen > 0)
|
if (trcreclen > 0)
|
||||||
{
|
{
|
||||||
err = NOERR;
|
if (DB_tagget(fhnd) == -1)
|
||||||
if (DB_tagget(isam_handle) == -1)
|
|
||||||
err = _ispatherr;
|
err = _ispatherr;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const int dbfreclen = DB_reclen(isam_handle);
|
const int dbfreclen = DB_reclen(fhnd);
|
||||||
if (dbfreclen != trcreclen)
|
if (dbfreclen != trcreclen)
|
||||||
err = _istrcerr;
|
err = _istrcerr;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user