From 5c0da43d19d3ec1628494c6504da41e2ca675e61 Mon Sep 17 00:00:00 2001 From: Jfreegman Date: Mon, 12 Aug 2013 22:34:08 -0400 Subject: [PATCH] unresolved addresses fail silently --- testing/toxic/chat.c | 3 ++- testing/toxic/main.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/testing/toxic/chat.c b/testing/toxic/chat.c index a312d211..a0a4b576 100644 --- a/testing/toxic/chat.c +++ b/testing/toxic/chat.c @@ -31,7 +31,8 @@ extern void fix_name(uint8_t *name); void print_help(ChatContext *self); void execute(ToxWindow *self, ChatContext *ctx, Messenger *m, char *cmd); -struct tm *get_time(void) { +struct tm *get_time(void) +{ struct tm *timeinfo; time_t now; time(&now); diff --git a/testing/toxic/main.c b/testing/toxic/main.c index 63c4db25..8ef44012 100644 --- a/testing/toxic/main.c +++ b/testing/toxic/main.c @@ -181,7 +181,7 @@ int init_connection(void) dht.port = htons(atoi(port)); uint32_t resolved_address = resolve_addr(ip); if (resolved_address == 0) - return 4; + return 0; dht.ip.i = resolved_address; unsigned char *binary_string = hex_string_to_bin(key); DHT_bootstrap(dht, binary_string);