Make patty_ax25_sock_ack() return 1 if N(R) = V(A)

Make patty_ax25_sock_ack() return 1 if N(R) = V(A), to provide a
convenient means of verifying that an acknowledgement from the peer is
at least valid for current sequence variables, even if no new frames are
acknowledged; patty_ax25_sock_ack_pending() can always be used to
determine when frames are still pending acknowledgement
This commit is contained in:
XANTRONIX Development 2020-08-23 17:35:42 -05:00 committed by XANTRONIX Industrial
parent 582c7f04d6
commit 25f2a0abe9

View file

@ -791,6 +791,10 @@ int patty_ax25_sock_ack(patty_ax25_sock *sock, int nr) {
max = nr, max = nr,
i; i;
if (min == max) {
return 1;
}
if (max < min) { if (max < min) {
max += sock->mode == PATTY_AX25_SOCK_SABME? 128: 8; max += sock->mode == PATTY_AX25_SOCK_SABME? 128: 8;
} }