Fix issue setting parameter bit fields in sock.c

Fix issue setting parameter bit fields in patty_ax25_sock_send_xid() in
src/sock.c, wherein the numerical values were simply bitwise ORed
This commit is contained in:
XANTRONIX Development 2020-07-19 22:48:48 -04:00 committed by XANTRONIX Industrial
parent d494ffecfc
commit 08c952ae07

View file

@ -472,20 +472,19 @@ ssize_t patty_ax25_sock_send_disc(patty_ax25_sock *sock, int pf) {
ssize_t patty_ax25_sock_send_xid(patty_ax25_sock *sock) { ssize_t patty_ax25_sock_send_xid(patty_ax25_sock *sock) {
patty_ax25_params params; patty_ax25_params params;
ssize_t encoded; ssize_t encoded;
if (sock->remote.callsign[0] == '\0') { if (sock->remote.callsign[0] == '\0') {
goto error_nopeer; goto error_nopeer;
} }
params.flags = PATTY_AX25_PARAM_CLASSES params.flags = (1 << PATTY_AX25_PARAM_CLASSES)
| PATTY_AX25_PARAM_HDLC | (1 << PATTY_AX25_PARAM_HDLC)
| PATTY_AX25_PARAM_INFO_TX | (1 << PATTY_AX25_PARAM_INFO_RX)
| PATTY_AX25_PARAM_INFO_RX | (1 << PATTY_AX25_PARAM_WINDOW_RX)
| PATTY_AX25_PARAM_WINDOW_TX | (1 << PATTY_AX25_PARAM_ACK)
| PATTY_AX25_PARAM_WINDOW_RX | (1 << PATTY_AX25_PARAM_RETRY);
| PATTY_AX25_PARAM_ACK
| PATTY_AX25_PARAM_RETRY;
/* /*
* TODO: This value needs to come from the interface this socket is bound * TODO: This value needs to come from the interface this socket is bound