stun

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

commit 285ee5581996285bcd6c42993c29b563b7fba484
parent 465c7e431f386ef0bcc86008a5f525fc60ed2443
Author: sin <sin@2f30.org>
Date:   Sat,  2 Apr 2016 09:24:51 +0100

reorder debug print

Diffstat:
Mstun.c | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/stun.c b/stun.c @@ -691,14 +691,13 @@ clientsetup(int devfd) logwarn("failed to connect to %s:%s", host, port); return -1; } + if (debug) + logdbg("connected to %s:%s", host, port); ms2tv(&tv, RCVTIMEO); setsockopt(netfd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)); setsockopt(netfd, IPPROTO_TCP, TCP_NODELAY, (int []){1}, sizeof(int)); - if (debug) - logdbg("connected to %s:%s", host, port); - if (response(netfd) < 0 || challenge(netfd) < 0) { logwarn("challenge-response failed"); goto err;