diff options
Diffstat (limited to 'testing/Messenger_test.c')
-rw-r--r-- | testing/Messenger_test.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/testing/Messenger_test.c b/testing/Messenger_test.c index e85a85a2..04d3bc14 100644 --- a/testing/Messenger_test.c +++ b/testing/Messenger_test.c | |||
@@ -100,7 +100,8 @@ 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 | m = initMessenger(0); | ||
104 | 105 | ||
105 | if ( !m ) { | 106 | if ( !m ) { |
106 | fputs("Failed to allocate messenger datastructure\n", stderr); | 107 | fputs("Failed to allocate messenger datastructure\n", stderr); |
@@ -108,10 +109,8 @@ int main(int argc, char *argv[]) | |||
108 | } | 109 | } |
109 | 110 | ||
110 | if (argc > 3) { | 111 | if (argc > 3) { |
111 | IP_Port bootstrap_ip_port; | 112 | uint16_t port = htons(atoi(argv[2])); |
112 | bootstrap_ip_port.port = htons(atoi(argv[2])); | 113 | DHT_bootstrap_ex(m->dht, argv[1], 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 { | 114 | } else { |
116 | FILE *file = fopen(argv[1], "rb"); | 115 | FILE *file = fopen(argv[1], "rb"); |
117 | 116 | ||