udp-turn: handle multiple RFC4571 frames received in a TCP-TURN message
authorJakub Adam <jakub.adam@ktknet.cz>
Fri, 26 Oct 2018 22:31:53 +0000 (00:31 +0200)
committerJakub Adam <jakub.adam@ktknet.cz>
Wed, 31 Oct 2018 11:45:16 +0000 (12:45 +0100)
commitd79d1179113f4847aceb8249ce7d75ca6fc8c140
tree581b61000cc4f00f1e33b6006ce3297c4b25eb4e
parent5aa499206cec322f918d51d157da9b8af5beed22
udp-turn: handle multiple RFC4571 frames received in a TCP-TURN message

There might be multiple RFC4571-framed messages (or fragments thereof)
within a single TCP-TURN message. Make sure each NiceInputMessage
passed by the user into socket_recv_messages() gets exactly one RFC4571
frame, or remains empty if there aren't any messages to receive.

We should keep any data that doesn't fit into the user buffers for
the next time socket_recv_messages() gets called with the socket.
socket/udp-turn.c
tests/Makefile.am
tests/test-udp-turn-fragmentation.c [new file with mode: 0644]