Remove unused patty_ax25_sock_flow_full()
Remove unused patty_ax25_sock_flow_full(), in favor of the previously implemented patty_ax25_sock_flow_left(), as a better means of determining what flow control measures to take and how to interrogate the peer for readiness to receive with minimal overhead
This commit is contained in:
parent
dfa2ff547a
commit
826653f0d9
2 changed files with 5 additions and 11 deletions
|
@ -202,8 +202,6 @@ void patty_ax25_sock_vr_incr(patty_ax25_sock *sock);
|
|||
|
||||
int patty_ax25_sock_flow_left(patty_ax25_sock *sock);
|
||||
|
||||
int patty_ax25_sock_flow_full(patty_ax25_sock *sock);
|
||||
|
||||
/*
|
||||
* Frame segment reassembly state machine
|
||||
*/
|
||||
|
|
14
src/sock.c
14
src/sock.c
|
@ -536,14 +536,6 @@ void *patty_ax25_sock_assembler_read(patty_ax25_sock *sock,
|
|||
}
|
||||
|
||||
int patty_ax25_sock_flow_left(patty_ax25_sock *sock) {
|
||||
if (sock->n_window_tx == 1) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return sock->vs - tx_seq(sock, sock->va + sock->n_window_tx);
|
||||
}
|
||||
|
||||
int patty_ax25_sock_flow_full(patty_ax25_sock *sock) {
|
||||
/*
|
||||
* 6.4.1 Sending I Frames
|
||||
*
|
||||
|
@ -552,7 +544,11 @@ int patty_ax25_sock_flow_full(patty_ax25_sock *sock) {
|
|||
* k. If the TNC sent more I frames, the flow control window would be
|
||||
* exceeded and errors could result.
|
||||
*/
|
||||
return sock->vs == tx_seq(sock, sock->va + sock->n_window_tx)? 1: 0;
|
||||
if (sock->n_window_tx == 1) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return sock->vs - tx_seq(sock, sock->va + sock->n_window_tx);
|
||||
}
|
||||
|
||||
static inline int toobig(patty_ax25_sock *sock,
|
||||
|
|
Loading…
Add table
Reference in a new issue