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:
parent
d494ffecfc
commit
08c952ae07
1 changed files with 7 additions and 8 deletions
15
src/sock.c
15
src/sock.c
|
@ -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) {
|
||||
patty_ax25_params params;
|
||||
|
||||
ssize_t encoded;
|
||||
|
||||
if (sock->remote.callsign[0] == '\0') {
|
||||
goto error_nopeer;
|
||||
}
|
||||
|
||||
params.flags = PATTY_AX25_PARAM_CLASSES
|
||||
| PATTY_AX25_PARAM_HDLC
|
||||
| PATTY_AX25_PARAM_INFO_TX
|
||||
| PATTY_AX25_PARAM_INFO_RX
|
||||
| PATTY_AX25_PARAM_WINDOW_TX
|
||||
| PATTY_AX25_PARAM_WINDOW_RX
|
||||
| PATTY_AX25_PARAM_ACK
|
||||
| PATTY_AX25_PARAM_RETRY;
|
||||
params.flags = (1 << PATTY_AX25_PARAM_CLASSES)
|
||||
| (1 << PATTY_AX25_PARAM_HDLC)
|
||||
| (1 << PATTY_AX25_PARAM_INFO_RX)
|
||||
| (1 << PATTY_AX25_PARAM_WINDOW_RX)
|
||||
| (1 << PATTY_AX25_PARAM_ACK)
|
||||
| (1 << PATTY_AX25_PARAM_RETRY);
|
||||
|
||||
/*
|
||||
* TODO: This value needs to come from the interface this socket is bound
|
||||
|
|
Loading…
Add table
Reference in a new issue