Fix I frame encoding issue

Fix I frame encoding issue in patty_ax25_sock_write() wherein the N(S)
field was incorrectly encoded one bit too far to the right in the
control field
This commit is contained in:
XANTRONIX 2020-07-31 01:10:16 -04:00 committed by XANTRONIX Industrial
parent c61b09dedc
commit 62c116a17c

View file

@ -454,12 +454,12 @@ static uint16_t control_i(patty_ax25_sock *sock, int flag) {
switch (sock->mode) {
case PATTY_AX25_SOCK_SABM:
return ((sock->seq_recv & 0x07) << 5)
| ((sock->seq_send & 0x07))
| ((sock->seq_send & 0x07) << 1)
| (flag << 4);
case PATTY_AX25_SOCK_SABME:
return ((sock->seq_recv & 0x7f) << 9)
| ((sock->seq_send & 0x7f))
| ((sock->seq_send & 0x7f) << 1)
| (flag << 8);
default: