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:
XANTRONIX Development 2020-08-23 00:37:13 -05:00 committed by XANTRONIX Industrial
parent dfa2ff547a
commit 826653f0d9
2 changed files with 5 additions and 11 deletions

View file

@ -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_left(patty_ax25_sock *sock);
int patty_ax25_sock_flow_full(patty_ax25_sock *sock);
/* /*
* Frame segment reassembly state machine * Frame segment reassembly state machine
*/ */

View file

@ -536,14 +536,6 @@ void *patty_ax25_sock_assembler_read(patty_ax25_sock *sock,
} }
int patty_ax25_sock_flow_left(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 * 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 * k. If the TNC sent more I frames, the flow control window would be
* exceeded and errors could result. * 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, static inline int toobig(patty_ax25_sock *sock,