mirror of
https://github.com/Tha14/toxic.git
synced 2025-02-17 05:37:25 +01:00
Merge remote-tracking branch 'upstream/master' into ipv6.init_connection
This commit is contained in:
commit
560e6be66b
@ -136,7 +136,7 @@ int serverlist_load()
|
|||||||
char line[MAXLINE];
|
char line[MAXLINE];
|
||||||
while (fgets(line, sizeof(line), fp) && linecnt < MAXSERVERS) {
|
while (fgets(line, sizeof(line), fp) && linecnt < MAXSERVERS) {
|
||||||
if (strlen(line) > MINLINE) {
|
if (strlen(line) > MINLINE) {
|
||||||
char *name = strtok(server, " ");
|
char *name = strtok(line, " ");
|
||||||
char *port = strtok(NULL, " ");
|
char *port = strtok(NULL, " ");
|
||||||
char *key_ascii = strtok(NULL, " ");
|
char *key_ascii = strtok(NULL, " ");
|
||||||
/* invalid line */
|
/* invalid line */
|
||||||
@ -149,7 +149,7 @@ int serverlist_load()
|
|||||||
|
|
||||||
uint8_t *key_binary = hex_string_to_bin(key_ascii);
|
uint8_t *key_binary = hex_string_to_bin(key_ascii);
|
||||||
memcpy(keys[linecnt], key_binary, TOX_CLIENT_ID_SIZE);
|
memcpy(keys[linecnt], key_binary, TOX_CLIENT_ID_SIZE);
|
||||||
free(binary_string);
|
free(key_binary);
|
||||||
|
|
||||||
linecnt++;
|
linecnt++;
|
||||||
}
|
}
|
||||||
@ -166,7 +166,7 @@ int serverlist_load()
|
|||||||
|
|
||||||
int init_connection_helper(Tox *m, int linenumber)
|
int init_connection_helper(Tox *m, int linenumber)
|
||||||
{
|
{
|
||||||
return tox_bootstrap_from_address(m, servers[linenumber, TOX_ENABLE_IPV6_DEFAULT,
|
return tox_bootstrap_from_address(m, servers[linenumber], TOX_ENABLE_IPV6_DEFAULT,
|
||||||
ports[linenumber], keys[linenumber]);
|
ports[linenumber], keys[linenumber]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user