mirror of
https://github.com/open-simh/simh.git
synced 2026-01-13 23:37:13 +00:00
H316: Fix host interface word counts.
The host interface uses the UDP packet format from the modem interface, with an additional flags word. Ensure the flags are not included in the word count.
This commit is contained in:
parent
06a8447d26
commit
3baaf6c028
@ -344,7 +344,7 @@ void hi_start_tx (uint16 line, uint16 flags)
|
||||
tmp [0] = flags;
|
||||
for (i = 0; i < count; i ++)
|
||||
tmp [i + 1] = M [next+i];
|
||||
ret = udp_send(PDEVICE(line), PHIDB(line)->link, tmp, count);
|
||||
ret = udp_send(PDEVICE(line), PHIDB(line)->link, tmp, count + 1);
|
||||
free (tmp);
|
||||
if (ret != SCPE_OK && ret != 66) hi_link_error(line);
|
||||
}
|
||||
@ -438,6 +438,9 @@ void hi_poll_rx (uint16 line)
|
||||
return;
|
||||
}
|
||||
|
||||
// Exclude the flags from the count.
|
||||
count--;
|
||||
|
||||
// We really got a packet! Update the DMC pointers to reflect the actual
|
||||
// size of the packet received. If the packet length would have exceeded the
|
||||
// receiver buffer, then that sets the error flag too.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user