Fix XID I field size TX, RX parameter encoding

Fix XID I field size TX, RX parameter encoding to indicate the I frame
size in bits, rather than octets
This commit is contained in:
XANTRONIX Development 2020-08-02 19:14:57 -04:00 committed by XANTRONIX Industrial
parent 671d4ef337
commit eb04bc4bb5
2 changed files with 8 additions and 8 deletions

View file

@ -167,8 +167,8 @@ int patty_print_params(FILE *fh,
size_t value;
char *name;
} fields[] = {
{ PATTY_AX25_PARAM_INFO_TX, params->info_tx, "I Field Length TX" },
{ PATTY_AX25_PARAM_INFO_RX, params->info_rx, "I Field Length RX" },
{ PATTY_AX25_PARAM_INFO_TX, params->info_tx >> 3, "I Field Length TX" },
{ PATTY_AX25_PARAM_INFO_RX, params->info_rx >> 3, "I Field Length RX" },
{ PATTY_AX25_PARAM_WINDOW_TX, params->window_tx, "Window Size TX" },
{ PATTY_AX25_PARAM_WINDOW_RX, params->window_rx, "Window Size RX" },
{ PATTY_AX25_PARAM_ACK, params->ack, "Ack timer" },

View file

@ -252,7 +252,7 @@ int patty_ax25_sock_params_set(patty_ax25_sock *sock,
if (params->flags & PATTY_AX25_PARAM_INFO_RX) {
if (sock->n_maxlen_tx > params->info_rx) {
sock->n_maxlen_tx = params->info_rx;
sock->n_maxlen_tx = params->info_rx >> 3;
}
}
@ -560,7 +560,7 @@ ssize_t patty_ax25_sock_send_xid(patty_ax25_sock *sock,
params.classes = sock->flags_classes;
params.hdlc = sock->flags_hdlc;
params.info_rx = sock->n_maxlen_rx;
params.info_rx = sock->n_maxlen_rx << 3;
params.window_rx = sock->n_window_rx;
params.ack = sock->n_ack;
params.retry = sock->n_retry;