Only use TX slot for outgoing I frames

In patty_ax25_sock_send(), only use a numbered TX slot in the ring
buffer when sending I frames, rather than the prior case when the frame
was not a U frame
This commit is contained in:
XANTRONIX Development 2020-07-31 01:08:43 -04:00 committed by XANTRONIX Industrial
parent 55d40749a4
commit c61b09dedc

View file

@ -390,8 +390,8 @@ ssize_t patty_ax25_sock_send(patty_ax25_sock *sock,
size_t offset = 0;
ssize_t encoded;
uint8_t *buf = PATTY_AX25_FRAME_CONTROL_U(control)?
sock->tx_buf: tx_slot(sock, sock->seq_send);
uint8_t *buf = PATTY_AX25_FRAME_CONTROL_I(control)?
tx_slot(sock, sock->seq_send): sock->tx_buf;
if (sock->iface == NULL) {
errno = ENETDOWN;