stun

simple point to point tunnel
git clone git://git.2f30.org/stun
Log | Files | Refs | README

commit 1d10d45f13233df77cb0fa7986e4fb239e7c0ea6
parent f10bf9bf69a68cac25e77468607f3c7dcce17d53
Author: sin <sin@2f30.org>
Date:   Thu, 31 Mar 2016 14:44:53 +0100

check poll fd error

Diffstat:
Mstun.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/stun.c b/stun.c @@ -552,6 +552,10 @@ challenge(int netfd) logwarn("poll failed"); return -1; } + + if (pfd[0].revents & (POLLERR | POLLNVAL)) + logerr("bad fd in poll set"); + if (pfd[0].revents & (POLLIN | POLLHUP)) { ret = readnet(netfd, buf, sizeof(uint64_t)); if (ret <= 0 || ret == BADPKT)