stun

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

commit d9197eccf82c172461f7428d6be74cb040c7a4a6
parent 8f4731520c519ba8c60955fe8e97cc9dcd2fcab7
Author: sin <sin@2f30.org>
Date:   Thu Mar 24 10:45:25 +0000

challenge() should return -1 on failure and 0 on success

thanks rain1

Diffstat:
stun.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/stun.c b/stun.c @@ -445,7 +445,9 @@ challenge(int netfd) if (readnet(netfd, buf, sizeof(buf)) <= 0) return -1; reply = unpack32(buf); - return n + 1 == reply; + if (n + 1 == reply) + return 0; + return -1; } } return -1;