diff options
Diffstat (limited to 'toxcore/Messenger.c')
-rw-r--r-- | toxcore/Messenger.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index e4d45779..176e80b5 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c | |||
@@ -1515,19 +1515,20 @@ static void do_reqchunk_filecb(Messenger *m, int32_t friendnumber) | |||
1515 | } | 1515 | } |
1516 | 1516 | ||
1517 | /* Run this when the friend disconnects. | 1517 | /* Run this when the friend disconnects. |
1518 | * Sets all current file transfers to broken. | 1518 | * Kill all current file transfers. |
1519 | */ | 1519 | */ |
1520 | static void break_files(const Messenger *m, int32_t friendnumber) | 1520 | static void break_files(const Messenger *m, int32_t friendnumber) |
1521 | { | 1521 | { |
1522 | uint32_t i; | 1522 | uint32_t i; |
1523 | /* TODO | 1523 | |
1524 | for (i = 0; i < MAX_CONCURRENT_FILE_PIPES; ++i) { | 1524 | //TODO: Inform the client which file transfers get killed with a callback? |
1525 | if (m->friendlist[friendnumber].file_sending[i].status != FILESTATUS_NONE) | 1525 | for (i = 0; i < MAX_CONCURRENT_FILE_PIPES; ++i) { |
1526 | m->friendlist[friendnumber].file_sending[i].status = FILESTATUS_BROKEN; | 1526 | if (m->friendlist[friendnumber].file_sending[i].status != FILESTATUS_NONE) |
1527 | 1527 | m->friendlist[friendnumber].file_sending[i].status = FILESTATUS_NONE; | |
1528 | if (m->friendlist[friendnumber].file_receiving[i].status != FILESTATUS_NONE) | 1528 | |
1529 | m->friendlist[friendnumber].file_receiving[i].status = FILESTATUS_BROKEN; | 1529 | if (m->friendlist[friendnumber].file_receiving[i].status != FILESTATUS_NONE) |
1530 | }*/ | 1530 | m->friendlist[friendnumber].file_receiving[i].status = FILESTATUS_NONE; |
1531 | } | ||
1531 | } | 1532 | } |
1532 | 1533 | ||
1533 | /* return -1 on failure, 0 on success. | 1534 | /* return -1 on failure, 0 on success. |