summaryrefslogtreecommitdiff
path: root/testing/Messenger_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'testing/Messenger_test.c')
-rw-r--r--testing/Messenger_test.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/testing/Messenger_test.c b/testing/Messenger_test.c
index e85a85a2..73d44efb 100644
--- a/testing/Messenger_test.c
+++ b/testing/Messenger_test.c
@@ -100,7 +100,9 @@ int main(int argc, char *argv[])
100 exit(0); 100 exit(0);
101 } 101 }
102 102
103 m = initMessenger(); 103 /* IPv6: maybe allow from cmdline --ipv6? sticking to IPv4 for now */
104 uint8_t ipv6enabled = TOX_ENABLE_IPV6_DEFAULT;
105 m = initMessenger(ipv6enabled);
104 106
105 if ( !m ) { 107 if ( !m ) {
106 fputs("Failed to allocate messenger datastructure\n", stderr); 108 fputs("Failed to allocate messenger datastructure\n", stderr);
@@ -108,10 +110,8 @@ int main(int argc, char *argv[])
108 } 110 }
109 111
110 if (argc > 3) { 112 if (argc > 3) {
111 IP_Port bootstrap_ip_port; 113 uint16_t port = htons(atoi(argv[2]));
112 bootstrap_ip_port.port = htons(atoi(argv[2])); 114 DHT_bootstrap_ex(m->dht, argv[1], ipv6enabled, port, hex_string_to_bin(argv[3]));
113 bootstrap_ip_port.ip.uint32 = inet_addr(argv[1]);
114 DHT_bootstrap(m->dht, bootstrap_ip_port, hex_string_to_bin(argv[3]));
115 } else { 115 } else {
116 FILE *file = fopen(argv[1], "rb"); 116 FILE *file = fopen(argv[1], "rb");
117 117