From 8e43282fa9c48b7ff8630a6039bba815f1a1f283 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Mon, 22 Jul 2013 15:36:13 -0400 Subject: [PATCH] Bootstrap servers now route friend requests. --- other/DHT_bootstrap.c | 6 ++++-- other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/other/DHT_bootstrap.c b/other/DHT_bootstrap.c index f795482b..9ae22caa 100644 --- a/other/DHT_bootstrap.c +++ b/other/DHT_bootstrap.c @@ -3,12 +3,13 @@ * A simple DHT boostrap server for tox. * * Build commands (use one or the other): - * gcc -O2 -Wall -D VANILLA_NACL -o bootstrap_server ../core/Lossless_UDP.c ../core/network.c ../core/net_crypto.c ../core/Messenger.c ../core/DHT.c ../nacl/build/${HOSTNAME%.*}/lib/amd64/{cpucycles.o,libnacl.a,randombytes.o} DHT_bootstrap.c + * gcc -O2 -Wall -D VANILLA_NACL -o bootstrap_server ../core/Lossless_UDP.c ../core/network.c ../core/net_crypto.c ../core/Messenger.c ../core/DHT.c ../core/friend_requests.c ../nacl/build/${HOSTNAME%.*}/lib/amd64/{cpucycles.o,libnacl.a,randombytes.o} DHT_bootstrap.c * - * gcc -O2 -Wall -o bootstrap_server ../core/Lossless_UDP.c ../core/network.c ../core/net_crypto.c ../core/Messenger.c ../core/DHT.c -lsodium DHT_bootstrap.c + * gcc -O2 -Wall -o bootstrap_server ../core/Lossless_UDP.c ../core/network.c ../core/net_crypto.c ../core/Messenger.c ../core/DHT.c ../core/friend_requests.c -lsodium DHT_bootstrap.c */ #include "../core/DHT.h" +#include "../core/friend_requests.h" //Sleep function (x = milliseconds) #ifdef WIN32 @@ -82,6 +83,7 @@ int main(int argc, char *argv[]) while(receivepacket(&ip_port, data, &length) != -1) { DHT_handlepacket(data, length, ip_port); + friendreq_handlepacket(data, length, ip_port); } c_sleep(1); } diff --git a/other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c b/other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c index 276821e6..f060710b 100644 --- a/other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c +++ b/other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c @@ -11,6 +11,8 @@ #include #include "../core/DHT.h" +#include "../core/friend_requests.h" + /* Sleep function (x = milliseconds) */ #ifdef WIN32 @@ -123,6 +125,7 @@ int main(int argc, char *argv[]) { doDHT(); while(receivepacket(&ip_port, data, &length) != -1) { DHT_handlepacket(data, length, ip_port); + friendreq_handlepacket(data, length, ip_port); } c_sleep(1); }