From 305dda72d9daaa7bd7324e53a78fe6b999d373a4 Mon Sep 17 00:00:00 2001 From: z3bra Date: Fri, 25 Nov 2016 18:02:40 +0100 Subject: Discard sending of the avatar pictures --- ratox.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ratox.c') diff --git a/ratox.c b/ratox.c index 3953fa0..d05f800 100644 --- a/ratox.c +++ b/ratox.c @@ -785,6 +785,12 @@ cbfilesendreq(Tox *m, uint32_t frnum, uint32_t fnum, uint32_t kind, uint64_t fsz memcpy(filename, fname, flen); filename[flen] = '\0'; + if (kind == TOX_FILE_KIND_AVATAR) { + if (!tox_file_control(tox, f->num, fnum, TOX_FILE_CONTROL_CANCEL, NULL)) + weprintf("Failed to kill avatar transfer\n"); + return; + } + /* We only support a single transfer at a time */ if (f->rxstate == TRANSFER_INPROGRESS) { logmsg(": %s : Rx > Rejected %s, already one in progress\n", -- cgit v1.2.3