summaryrefslogtreecommitdiff
path: root/other/DHT_bootstrap.c
diff options
context:
space:
mode:
authormannol <eniz_vukovic@hotmail.com>2014-02-23 23:24:07 +0100
committermannol <eniz_vukovic@hotmail.com>2014-02-23 23:24:07 +0100
commitcf8a090cdeeb2630730203144001f1357b25ee01 (patch)
treeac52dcc5d043248cd719004d4eaffde64a65e3d3 /other/DHT_bootstrap.c
parent4888d916d037e371c88d39951f24f6ef4219c7cc (diff)
parentf219fb4ac1bf60eea3117df4aa8615cd07738a69 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'other/DHT_bootstrap.c')
-rw-r--r--other/DHT_bootstrap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/other/DHT_bootstrap.c b/other/DHT_bootstrap.c
index 307f80f6..291d6589 100644
--- a/other/DHT_bootstrap.c
+++ b/other/DHT_bootstrap.c
@@ -1,7 +1,7 @@
1 1
2/* DHT boostrap 2/* DHT boostrap
3 * 3 *
4 * A simple DHT boostrap server for tox. 4 * A simple DHT boostrap node for tox.
5 * 5 *
6 * Copyright (C) 2013 Tox project All Rights Reserved. 6 * Copyright (C) 2013 Tox project All Rights Reserved.
7 * 7 *
@@ -33,8 +33,8 @@
33 33
34#include "../testing/misc_tools.c" 34#include "../testing/misc_tools.c"
35 35
36#ifdef DHT_SERVER_EXTRA_PACKETS 36#ifdef DHT_NODE_EXTRA_PACKETS
37#include "./bootstrap_server_packets.c" 37#include "./bootstrap_node_packets.c"
38 38
39#define DHT_VERSION_NUMBER 1 39#define DHT_VERSION_NUMBER 1
40#define DHT_MOTD "This is a test motd" 40#define DHT_MOTD "This is a test motd"
@@ -111,7 +111,7 @@ int main(int argc, char *argv[])
111 Onion *onion = new_onion(dht); 111 Onion *onion = new_onion(dht);
112 Onion_Announce *onion_a = new_onion_announce(dht); 112 Onion_Announce *onion_a = new_onion_announce(dht);
113 113
114#ifdef DHT_SERVER_EXTRA_PACKETS 114#ifdef DHT_NODE_EXTRA_PACKETS
115 bootstrap_set_callbacks(dht->net, DHT_VERSION_NUMBER, DHT_MOTD, sizeof(DHT_MOTD)); 115 bootstrap_set_callbacks(dht->net, DHT_VERSION_NUMBER, DHT_MOTD, sizeof(DHT_MOTD));
116#endif 116#endif
117 117
@@ -123,7 +123,7 @@ int main(int argc, char *argv[])
123 perror("Initialization"); 123 perror("Initialization");
124 124
125 manage_keys(dht); 125 manage_keys(dht);
126 /* We want our DHT public key to be the same as our internal one since this is a bootstrap server */ 126 /* We want our DHT public key to be the same as our internal one since this is a bootstrap node */
127 memcpy(dht->self_public_key, dht->c->self_public_key, crypto_box_PUBLICKEYBYTES); 127 memcpy(dht->self_public_key, dht->c->self_public_key, crypto_box_PUBLICKEYBYTES);
128 memcpy(dht->self_secret_key, dht->c->self_secret_key, crypto_box_SECRETKEYBYTES); 128 memcpy(dht->self_secret_key, dht->c->self_secret_key, crypto_box_SECRETKEYBYTES);
129 printf("Public key: "); 129 printf("Public key: ");
@@ -166,7 +166,7 @@ int main(int argc, char *argv[])
166 166
167 while (1) { 167 while (1) {
168 if (is_waiting_for_dht_connection && DHT_isconnected(dht)) { 168 if (is_waiting_for_dht_connection && DHT_isconnected(dht)) {
169 printf("Connected to other bootstrap server successfully.\n"); 169 printf("Connected to other bootstrap node successfully.\n");
170 is_waiting_for_dht_connection = 0; 170 is_waiting_for_dht_connection = 0;
171 } 171 }
172 172