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:
parent
582c7f04d6
commit
25f2a0abe9
1 changed files with 4 additions and 0 deletions
|
@ -791,6 +791,10 @@ int patty_ax25_sock_ack(patty_ax25_sock *sock, int nr) {
|
|||
max = nr,
|
||||
i;
|
||||
|
||||
if (min == max) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (max < min) {
|
||||
max += sock->mode == PATTY_AX25_SOCK_SABME? 128: 8;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue