summaryrefslogtreecommitdiff
path: root/auto_tests/simple_conference_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'auto_tests/simple_conference_test.c')
-rw-r--r--auto_tests/simple_conference_test.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/auto_tests/simple_conference_test.c b/auto_tests/simple_conference_test.c
index b6c19d13..ad17d02e 100644
--- a/auto_tests/simple_conference_test.c
+++ b/auto_tests/simple_conference_test.c
@@ -103,6 +103,8 @@ static void handle_conference_namelist_change(Tox *tox, uint32_t conference_numb
103 103
104int main() 104int main()
105{ 105{
106 setvbuf(stdout, nullptr, _IONBF, 0);
107
106 State state1 = {1}; 108 State state1 = {1};
107 State state2 = {2}; 109 State state2 = {2};
108 State state3 = {3}; 110 State state3 = {3};
@@ -123,6 +125,14 @@ int main()
123 tox_self_get_public_key(tox2, key); 125 tox_self_get_public_key(tox2, key);
124 tox_friend_add_norequest(tox3, key, nullptr); // tox3 -> tox2 126 tox_friend_add_norequest(tox3, key, nullptr); // tox3 -> tox2
125 127
128 printf("bootstrapping tox2 and tox3 off tox1\n");
129 uint8_t dht_key[TOX_PUBLIC_KEY_SIZE];
130 tox_self_get_dht_id(tox1, dht_key);
131 const uint16_t dht_port = tox_self_get_udp_port(tox1, nullptr);
132
133 tox_bootstrap(tox2, "localhost", dht_port, dht_key, nullptr);
134 tox_bootstrap(tox3, "localhost", dht_port, dht_key, nullptr);
135
126 // Connection callbacks. 136 // Connection callbacks.
127 tox_callback_self_connection_status(tox1, handle_self_connection_status); 137 tox_callback_self_connection_status(tox1, handle_self_connection_status);
128 tox_callback_self_connection_status(tox2, handle_self_connection_status); 138 tox_callback_self_connection_status(tox2, handle_self_connection_status);