Handle XID frames in src/server.c

Handle XID frames in src/server.c by decoding the parameter information
and passing it to patty_ax25_sock_params_set()
This commit is contained in:
XANTRONIX Development 2020-07-19 01:47:05 -04:00 committed by XANTRONIX Industrial
parent 052c7d94d0
commit 4bfe7da77b

View file

@ -1321,12 +1321,20 @@ static int handle_xid(patty_ax25_server *server,
}
/*
* TODO: Actually do something with the parameters received; also perhaps
* consider replying to this XID frame with another XID frame
* Since we've received an XID packet, we can assume that the remote
* station is capable of speaking AX.25 v2.2. Therefore, we should
* upgrade the socket defaults accordingly, and negotiate downwards
* as necessary.
*/
patty_ax25_sock_upgrade(sock);
if (patty_ax25_sock_params_set(sock, &params) < 0) {
goto error_sock_params_set;
}
return 0;
error_sock_params_set:
error_io:
return -1;
}