summaryrefslogtreecommitdiff
path: root/testing/nTox.c
diff options
context:
space:
mode:
Diffstat (limited to 'testing/nTox.c')
-rw-r--r--testing/nTox.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/testing/nTox.c b/testing/nTox.c
index 15e209a9..9a07ecdc 100644
--- a/testing/nTox.c
+++ b/testing/nTox.c
@@ -142,7 +142,9 @@ void line_eval(char *line)
142 for (i = 0; i < 128; i++) 142 for (i = 0; i < 128; i++)
143 temp_id[i] = line[i+prompt_offset]; 143 temp_id[i] = line[i+prompt_offset];
144 144
145 int num = m_addfriend(hex_string_to_bin(temp_id), (uint8_t*)"Install Gentoo", sizeof("Install Gentoo")); 145 unsigned char *bin_string = hex_string_to_bin(temp_id);
146 int num = m_addfriend(bin_string, (uint8_t*)"Install Gentoo", sizeof("Install Gentoo"));
147 free(bin_string);
146 char numstring[100]; 148 char numstring[100];
147 switch (num) { 149 switch (num) {
148 case -1: 150 case -1:
@@ -456,7 +458,9 @@ int main(int argc, char *argv[])
456 else 458 else
457 exit(1); 459 exit(1);
458 460
459 DHT_bootstrap(bootstrap_ip_port, hex_string_to_bin(argv[3])); 461 unsigned char *binary_string = hex_string_to_bin(argv[3]);
462 DHT_bootstrap(bootstrap_ip_port, binary_string);
463 free(binary_string);
460 nodelay(stdscr, TRUE); 464 nodelay(stdscr, TRUE);
461 while(true) { 465 while(true) {
462 if (on == 0 && DHT_isconnected()) { 466 if (on == 0 && DHT_isconnected()) {