PDP10: Fix printer idle flush logic to properly reference the LP20 unit structure

This commit is contained in:
Mark Pizzolato 2016-07-21 05:45:30 -07:00
parent 63cf98f84b
commit 75ab9f513b

View file

@ -998,7 +998,7 @@ return reason;
* So u3 contains the number of seconds desired, and u4 the number to go. * So u3 contains the number of seconds desired, and u4 the number to go.
*/ */
static void set_flush_timer (UNIT *uptr) { static void set_flush_timer (UNIT *uptr) {
uptr = (UNIT *)uptr->up7; uptr = lp20_unit+1;
uptr->u4 = uptr->u3; uptr->u4 = uptr->u3;
uptr->u5 = (int32)time(NULL); uptr->u5 = (int32)time(NULL);
sim_cancel(uptr); sim_cancel(uptr);
@ -1011,7 +1011,7 @@ if (--uptr->u4 > 0) {
sim_activate_after (uptr, uptr->wait); sim_activate_after (uptr, uptr->wait);
return SCPE_OK; return SCPE_OK;
} }
uptr = (UNIT *)uptr->up7; uptr = lp20_unit+1;
fflush (uptr->fileref); fflush (uptr->fileref);
return SCPE_OK; return SCPE_OK;
} }