diff options
author | sin <sin@2f30.org> | 2014-09-16 13:18:39 +0100 |
---|---|---|
committer | sin <sin@2f30.org> | 2014-09-16 13:18:39 +0100 |
commit | 543682066d4cf6ffad3ad9f2e41f200a2c2fdcd7 (patch) | |
tree | 380e8bb40c53ad44216747784fe178549ab2c792 | |
parent | 8682bdcee802056172e9214971c3883e23b40ac2 (diff) |
Correctly inform the user when the transfer is complete
-rw-r--r-- | ratatox.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -379,7 +379,6 @@ cb_file_control(Tox *m, int32_t fid, uint8_t rec_sen, uint8_t fnum, uint8_t ctrl if (f->fid != fid) continue; f->t.state = TRANSFER_DONE; - printout("Transfer complete\n"); break; } } @@ -414,7 +413,6 @@ again: return; } f->t.n = n; - /* relax - allow for tox_do() to do its job */ if (tox_file_send_data(tox, f->fid, f->t.fnum, f->t.buf, f->t.n) == -1) { /* remember to resend the last buffer */ f->t.pending = 1; @@ -924,8 +922,10 @@ loop(void) switch (f->t.state) { case TRANSFER_INPROGRESS: send_friend_file(f); - if (f->t.state == TRANSFER_DONE) + if (f->t.state == TRANSFER_DONE) { + printout("Transfer complete\n"); f->t.state = TRANSFER_NONE; + } break; } } @@ -954,8 +954,10 @@ loop(void) break; case TRANSFER_INPROGRESS: send_friend_file(f); - if (f->t.state == TRANSFER_DONE) + if (f->t.state == TRANSFER_DONE) { + printout("Transfer complete\n"); f->t.state = TRANSFER_NONE; + } break; } break; |