TMXR: Make sure to only set UNIT_TM_POLL flag for active tmxr units.

The effect here is to avoid clearing the UNIT_TM_POLL flag for devices which
call tmxr_set_line_unit or tmxr_set_line_output_unit on device reset.

As reported in #646
This commit is contained in:
Mark Pizzolato 2019-01-05 07:38:02 -08:00
parent f8bc1add59
commit 59bfff4bfd

View file

@ -3130,7 +3130,8 @@ if ((line < 0) || (line >= mp->lines))
if (mp->ldsc[line].uptr)
mp->ldsc[line].uptr->dynflags &= ~UNIT_TM_POLL;
mp->ldsc[line].uptr = uptr_poll;
mp->ldsc[line].uptr->dynflags |= UNIT_TM_POLL;
if (uptr_poll->tmxr) /* associated with a TMXR? */
mp->ldsc[line].uptr->dynflags |= UNIT_TM_POLL;
return SCPE_OK;
}
@ -3164,7 +3165,8 @@ if ((line < 0) || (line >= mp->lines))
if (mp->ldsc[line].o_uptr)
mp->ldsc[line].o_uptr->dynflags &= ~UNIT_TM_POLL;
mp->ldsc[line].o_uptr = uptr_poll;
mp->ldsc[line].o_uptr->dynflags |= UNIT_TM_POLL;
if (uptr_poll->tmxr) /* associated with a TMXR? */
mp->ldsc[line].o_uptr->dynflags |= UNIT_TM_POLL;
return SCPE_OK;
}