mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-22 22:23:03 +01:00
unresolved addresses fail silently
This commit is contained in:
parent
0c6204ce82
commit
095b1b5db2
3
chat.c
3
chat.c
@ -31,7 +31,8 @@ extern void fix_name(uint8_t *name);
|
|||||||
void print_help(ChatContext *self);
|
void print_help(ChatContext *self);
|
||||||
void execute(ToxWindow *self, ChatContext *ctx, Messenger *m, char *cmd);
|
void execute(ToxWindow *self, ChatContext *ctx, Messenger *m, char *cmd);
|
||||||
|
|
||||||
struct tm *get_time(void) {
|
struct tm *get_time(void)
|
||||||
|
{
|
||||||
struct tm *timeinfo;
|
struct tm *timeinfo;
|
||||||
time_t now;
|
time_t now;
|
||||||
time(&now);
|
time(&now);
|
||||||
|
2
main.c
2
main.c
@ -181,7 +181,7 @@ int init_connection(void)
|
|||||||
dht.port = htons(atoi(port));
|
dht.port = htons(atoi(port));
|
||||||
uint32_t resolved_address = resolve_addr(ip);
|
uint32_t resolved_address = resolve_addr(ip);
|
||||||
if (resolved_address == 0)
|
if (resolved_address == 0)
|
||||||
return 4;
|
return 0;
|
||||||
dht.ip.i = resolved_address;
|
dht.ip.i = resolved_address;
|
||||||
unsigned char *binary_string = hex_string_to_bin(key);
|
unsigned char *binary_string = hex_string_to_bin(key);
|
||||||
DHT_bootstrap(dht, binary_string);
|
DHT_bootstrap(dht, binary_string);
|
||||||
|
Loading…
Reference in New Issue
Block a user