mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 06:43:03 +01:00
ignore tox_load errors until toxcore is fixed
This commit is contained in:
parent
de30433e26
commit
e9a0296851
@ -138,7 +138,7 @@ static int save_blocklist(char *path)
|
|||||||
exit_toxic_err("Failed in save_blocklist", FATALERR_MEMORY);
|
exit_toxic_err("Failed in save_blocklist", FATALERR_MEMORY);
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
int ret = -1;
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
for (i = 0; i < Blocked.max_idx; ++i) {
|
for (i = 0; i < Blocked.max_idx; ++i) {
|
||||||
@ -168,14 +168,14 @@ static int save_blocklist(char *path)
|
|||||||
goto on_error;
|
goto on_error;
|
||||||
|
|
||||||
if (fwrite(data, len, 1, fp) == 1)
|
if (fwrite(data, len, 1, fp) == 1)
|
||||||
ret = 0;
|
goto on_error;
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
return ret;
|
return 0;
|
||||||
|
|
||||||
on_error:
|
on_error:
|
||||||
free(data);
|
free(data);
|
||||||
return ret;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sort_blocklist_index(void);
|
static void sort_blocklist_index(void);
|
||||||
|
@ -690,11 +690,8 @@ static void load_data(Tox *m, char *path)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (tox_load(m, (uint8_t *) buf, len) != 0) {
|
/* tox_load errors are to be ignored until toxcore is fixed */
|
||||||
fclose(fd);
|
tox_load(m, (uint8_t *) buf, len);
|
||||||
free(buf);
|
|
||||||
exit_toxic_err("failed in load_data", FATALERR_FILEOP);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
load_friendlist(m);
|
load_friendlist(m);
|
||||||
|
Loading…
Reference in New Issue
Block a user