mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 01:43:01 +01:00
port is no longer passed in network byte order to tox_bootstrap_from_address()
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
This commit is contained in:
parent
dc9ffa6e56
commit
39556b36f3
@ -209,7 +209,7 @@ void cmd_connect(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)
|
||||
}
|
||||
|
||||
char *binary_string = hex_string_to_bin(key);
|
||||
tox_bootstrap_from_address(m, ip, htons(atoi(port)), (uint8_t *) binary_string);
|
||||
tox_bootstrap_from_address(m, ip, atoi(port), (uint8_t *) binary_string);
|
||||
free(binary_string);
|
||||
}
|
||||
|
||||
|
@ -266,7 +266,7 @@ static int load_nodelist(const char *filename)
|
||||
|
||||
snprintf(toxNodes.nodes[toxNodes.lines], sizeof(toxNodes.nodes[toxNodes.lines]), "%s", name);
|
||||
toxNodes.nodes[toxNodes.lines][NODELEN - 1] = 0;
|
||||
toxNodes.ports[toxNodes.lines] = htons(atoi(port));
|
||||
toxNodes.ports[toxNodes.lines] = atoi(port);
|
||||
|
||||
char *key_binary = hex_string_to_bin(key_ascii);
|
||||
memcpy(toxNodes.keys[toxNodes.lines], key_binary, TOX_CLIENT_ID_SIZE);
|
||||
|
Loading…
Reference in New Issue
Block a user