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
1 changed files with 4 additions and 1 deletions
|
@ -344,7 +344,7 @@ void hi_start_tx (uint16 line, uint16 flags)
|
||||||
tmp [0] = flags;
|
tmp [0] = flags;
|
||||||
for (i = 0; i < count; i ++)
|
for (i = 0; i < count; i ++)
|
||||||
tmp [i + 1] = M [next+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);
|
free (tmp);
|
||||||
if (ret != SCPE_OK && ret != 66) hi_link_error(line);
|
if (ret != SCPE_OK && ret != 66) hi_link_error(line);
|
||||||
}
|
}
|
||||||
|
@ -438,6 +438,9 @@ void hi_poll_rx (uint16 line)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Exclude the flags from the count.
|
||||||
|
count--;
|
||||||
|
|
||||||
// We really got a packet! Update the DMC pointers to reflect the actual
|
// 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
|
// size of the packet received. If the packet length would have exceeded the
|
||||||
// receiver buffer, then that sets the error flag too.
|
// receiver buffer, then that sets the error flag too.
|
||||||
|
|
Loading…
Add table
Reference in a new issue