udp-turn: don't re-iterate incoming TURN control messages
authorJakub Adam <jakub.adam@ktknet.cz>
Fri, 26 Oct 2018 23:10:22 +0000 (01:10 +0200)
committerJakub Adam <jakub.adam@ktknet.cz>
Wed, 31 Oct 2018 11:45:16 +0000 (12:45 +0100)
commit5aa499206cec322f918d51d157da9b8af5beed22
treee31851f6e1e24293b06b90e60ad365f15fa3cdfd
parent67771ba2a30ae7247262c252df052468809711eb
udp-turn: don't re-iterate incoming TURN control messages

After being parsed, a TURN control message turns into a NiceInputMessage
with zero length. Such message doesn't increment the iteration counter i
and so is re-processed in the next iteration, which detects right away
that message->length == 0 and continues to the next element in
recv_messages.

Thus, n_valid_messages variable serves no real purpose and to achieve
the same result we can simply increment the iteration counter after each
message.
socket/udp-turn.c