diff options
Diffstat (limited to 'testing/nTox.c')
-rw-r--r-- | testing/nTox.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/testing/nTox.c b/testing/nTox.c index 319002fd..dec7a12d 100644 --- a/testing/nTox.c +++ b/testing/nTox.c | |||
@@ -90,7 +90,7 @@ void print_friendlist() | |||
90 | char fstring[MAX_NAME_LENGTH + strlen("[i] Friend: NULL\n\tid: ")]; | 90 | char fstring[MAX_NAME_LENGTH + strlen("[i] Friend: NULL\n\tid: ")]; |
91 | 91 | ||
92 | if (strlen(name) <= 0) { | 92 | if (strlen(name) <= 0) { |
93 | sprintf(fstring, "[i] Friend: No Friend!\n\tid: %i", i); | 93 | sprintf(fstring, "[i] Friend: !\n\tid: %i", i); |
94 | } else { | 94 | } else { |
95 | sprintf(fstring, "[i] Friend: %s\n\tid: %i", (uint8_t*)name, i); | 95 | sprintf(fstring, "[i] Friend: %s\n\tid: %i", (uint8_t*)name, i); |
96 | } | 96 | } |
@@ -375,8 +375,6 @@ void load_key(char *path) | |||
375 | Messenger_load(data, size); | 375 | Messenger_load(data, size); |
376 | 376 | ||
377 | } else { | 377 | } else { |
378 | fputs("(saving new keys now)\n", stderr); | ||
379 | |||
380 | //else save new keys | 378 | //else save new keys |
381 | int size = Messenger_size(); | 379 | int size = Messenger_size(); |
382 | uint8_t data[size]; | 380 | uint8_t data[size]; |
@@ -389,7 +387,7 @@ void load_key(char *path) | |||
389 | } | 387 | } |
390 | 388 | ||
391 | if (fwrite(data, sizeof(uint8_t), size, data_file) != size){ | 389 | if (fwrite(data, sizeof(uint8_t), size, data_file) != size){ |
392 | printf("[i] could not write data file\n[i] exiting\n"); | 390 | puts("[i] could not write data file! exiting..."); |
393 | exit(1); | 391 | exit(1); |
394 | } | 392 | } |
395 | } | 393 | } |
@@ -401,7 +399,7 @@ void print_help(void) | |||
401 | printf("nTox %.1f - Command-line tox-core client\n", 0.1); | 399 | printf("nTox %.1f - Command-line tox-core client\n", 0.1); |
402 | puts("Options:"); | 400 | puts("Options:"); |
403 | puts("\t-h\t-\tPrint this help and exit."); | 401 | puts("\t-h\t-\tPrint this help and exit."); |
404 | puts("\t-f\t-\tSpecify a keyfile to read from."); | 402 | puts("\t-f\t-\tSpecify a keyfile to read (or write to) from."); |
405 | } | 403 | } |
406 | 404 | ||
407 | int main(int argc, char *argv[]) | 405 | int main(int argc, char *argv[]) |
@@ -447,7 +445,7 @@ int main(int argc, char *argv[]) | |||
447 | 445 | ||
448 | new_lines("/h for list of commands"); | 446 | new_lines("/h for list of commands"); |
449 | get_id(idstring); | 447 | get_id(idstring); |
450 | puts(idstring); | 448 | new_lines(idstring); |
451 | strcpy(line, ""); | 449 | strcpy(line, ""); |
452 | 450 | ||
453 | IP_Port bootstrap_ip_port; | 451 | IP_Port bootstrap_ip_port; |
@@ -457,7 +455,7 @@ int main(int argc, char *argv[]) | |||
457 | bootstrap_ip_port.ip.i = resolved_address; | 455 | bootstrap_ip_port.ip.i = resolved_address; |
458 | else | 456 | else |
459 | exit(1); | 457 | exit(1); |
460 | 458 | ||
461 | DHT_bootstrap(bootstrap_ip_port, hex_string_to_bin(argv[3])); | 459 | DHT_bootstrap(bootstrap_ip_port, hex_string_to_bin(argv[3])); |
462 | nodelay(stdscr, TRUE); | 460 | nodelay(stdscr, TRUE); |
463 | while(true) { | 461 | while(true) { |