This commit is contained in:
Michael Davidsaver
2013-03-28 08:46:18 -04:00
parent 8cb2aa729e
commit cf079a35d2
2 changed files with 36 additions and 9 deletions

View File

@@ -105,16 +105,28 @@ static long init_record(dbCommon *prec)
return 0;
}
if(ent.pflddes->field_type!=DBF_INLINK
&& ent.pflddes->field_type!=DBF_OUTLINK)
{
fprintf(stderr, "%s: INP/OUT has unacceptible type %d\n",
prec->name, ent.pflddes->field_type);
goto fail;
}
priv->plink = ent.pfield;
if(priv->plink->type != INST_IO) {
fprintf(stderr, "%s: Has invalid link type %d\n", prec->name, priv->plink->type);
free(priv);
return 0;
goto fail;
}
dbFreeEntry(&ent);
prec->dpvt = priv;
return 0;
fail:
dbFreeEntry(&ent);
free(priv);
return 0;
}
static long init_record2(dbCommon *prec)