1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-29 00:36:45 +02:00

A few small fixes

- Fix race condition in draw_peer()
- Handle realloc_peer_list() error
- Remove dead code in cmd_conference()
- Reduce scope of a few variable variables
- Fix possible buffer truncation in api.c
This commit is contained in:
jfreegman
2020-11-19 14:21:45 -05:00
parent 0554bf0240
commit 312b38d253
9 changed files with 40 additions and 41 deletions

View File

@ -504,8 +504,6 @@ static void chat_onFileControl(ToxWindow *self, Tox *m, uint32_t friendnum, uint
return;
}
char msg[MAX_STR_SIZE];
switch (control) {
case TOX_FILE_CONTROL_RESUME: {
/* transfer is accepted */
@ -531,6 +529,7 @@ static void chat_onFileControl(ToxWindow *self, Tox *m, uint32_t friendnum, uint
}
case TOX_FILE_CONTROL_CANCEL: {
char msg[MAX_STR_SIZE];
snprintf(msg, sizeof(msg), "File transfer for '%s' was aborted.", ft->file_name);
close_file_transfer(self, m, ft, -1, msg, notif_error);
break;