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:
@ -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;
|
||||
|
Reference in New Issue
Block a user