diff options
author | irungentoo <irungentoo@tox.im> | 2014-02-22 17:52:26 -0500 |
---|---|---|
committer | irungentoo <irungentoo@tox.im> | 2014-02-22 17:52:26 -0500 |
commit | f219fb4ac1bf60eea3117df4aa8615cd07738a69 (patch) | |
tree | 4268ae9377593d8632efbbe57bb4680744014f2a /other/DHT_bootstrap.c | |
parent | 388b1229b97f06ebfad1bb839a06bbeefe8cc2d1 (diff) | |
parent | 5a142bb697651693e4ce7654d2f74e688aab8894 (diff) |
Merge pull request #760 from nurupo/server-to-node
Renamed dht server to dht node
Diffstat (limited to 'other/DHT_bootstrap.c')
-rw-r--r-- | other/DHT_bootstrap.c | 12 |
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 | ||