unresolved addresses fail silently

This commit is contained in:
Jfreegman 2013-08-12 22:34:08 -04:00
parent 0ac4f1fcb3
commit 5c0da43d19
2 changed files with 3 additions and 2 deletions

View File

@ -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);

View File

@ -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);