Rename patty_ax25_sock 'pending' to 'rx_pending'

Rename patty_ax25_sock 'pending' to 'rx_pending' to better document its
purpose
This commit is contained in:
XANTRONIX Development 2020-08-19 22:09:56 -04:00 committed by XANTRONIX Industrial
parent 972b04c95f
commit 1819b7fb34
3 changed files with 12 additions and 12 deletions

View file

@ -128,7 +128,7 @@ typedef struct _patty_ax25_sock {
va;
size_t retries,
pending;
rx_pending;
int fd;
char pty[PATTY_AX25_SOCK_PATH_SIZE];

View file

@ -1533,8 +1533,8 @@ static int handle_i(patty_ax25_server *server,
}
}
if (++sock->pending == sock->n_window_rx / 2) {
sock->pending = 0;
if (++sock->rx_pending == sock->n_window_rx / 2) {
sock->rx_pending = 0;
patty_timer_stop(&sock->timer_t2);
@ -2140,8 +2140,8 @@ static int handle_sock(uint32_t key,
if (patty_timer_expired(&sock->timer_t2)) {
patty_timer_stop(&sock->timer_t2);
if (sock->pending) {
sock->pending = 0;
if (sock->rx_pending) {
sock->rx_pending = 0;
return patty_ax25_sock_send_rr(sock,
PATTY_AX25_FRAME_RESPONSE,

View file

@ -233,7 +233,7 @@ void patty_ax25_sock_init(patty_ax25_sock *sock) {
sock->n_ack = PATTY_AX25_SOCK_DEFAULT_ACK;
sock->n_retry = PATTY_AX25_SOCK_DEFAULT_RETRY;
sock->retries = PATTY_AX25_SOCK_DEFAULT_RETRY;
sock->pending = 0;
sock->rx_pending = 0;
patty_timer_init(&sock->timer_t1, sock->n_ack);
patty_timer_init(&sock->timer_t2, PATTY_AX25_SOCK_DEFAULT_DELAY);
@ -244,12 +244,12 @@ void patty_ax25_sock_init(patty_ax25_sock *sock) {
* AX.25 v2.2, Section 6.5 "Resetting Procedure"
*/
void patty_ax25_sock_reset(patty_ax25_sock *sock) {
sock->flow = PATTY_AX25_SOCK_READY;
sock->vs = 0;
sock->vr = 0;
sock->va = 0;
sock->retries = sock->n_retry;
sock->pending = 0;
sock->flow = PATTY_AX25_SOCK_READY;
sock->vs = 0;
sock->vr = 0;
sock->va = 0;
sock->retries = sock->n_retry;
sock->rx_pending = 0;
patty_timer_clear(&sock->timer_t1);
patty_timer_clear(&sock->timer_t2);