Fixed bug in dbPutFieldLink: Couldn't change INP/OUT field of any record

type that has no registered device support, whereas we should treat this
field just as any other non-device link field.
This commit is contained in:
Andrew Johnson
2008-06-05 22:06:58 +00:00
parent fdbb48af4f
commit e21bf9d9f1
+19 -10
View File
@@ -1073,16 +1073,25 @@ static long dbPutFieldLink(
if (inpOut) {
pdevSup = dbDTYPtoDevSup(precord->rdes, precord->dtyp);
if (pdevSup == NULL ||
(new_dset = pdevSup->pdset) == NULL ||
(new_dsxt = pdevSup->pdsxt) == NULL ||
new_dsxt->add_record == NULL ||
(precord->dset &&
((pdevSup = dbDSETtoDevSup(precord->rdes, precord->dset)) == NULL ||
pdevSup->pdsxt == NULL ||
pdevSup->pdsxt->del_record == NULL))) {
status = S_db_noSupport;
goto unlock;
if (pdevSup == NULL) {
/* This record type has no registered device support, but does have
* an INP or OUT field which we're currently writing to. We handle
* this INP/OUT field just like any other link field.
*/
inpOut = 0;
} else {
new_dset = pdevSup->pdset;
new_dsxt = pdevSup->pdsxt;
if (new_dset == NULL ||
new_dsxt == NULL ||
new_dsxt->add_record == NULL ||
(precord->dset &&
((pdevSup = dbDSETtoDevSup(precord->rdes, precord->dset)) == NULL ||
pdevSup->pdsxt == NULL ||
pdevSup->pdsxt->del_record == NULL))) {
status = S_db_noSupport;
goto unlock;
}
}
}