diff options
author | sin <sin@2f30.org> | 2014-09-24 17:05:08 +0100 |
---|---|---|
committer | sin <sin@2f30.org> | 2014-09-24 17:05:08 +0100 |
commit | 8fdbe6c876e9e2358c3b045c1ad6edd4a34a7436 (patch) | |
tree | 6c3be2bce5805fe35c575193f0f7431db95e2ee7 | |
parent | c28164d21d377a4e5327ddcc2bedc9cd356f772a (diff) |
Use unbuffered stdout
-rw-r--r-- | ratox.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -485,14 +485,12 @@ cbfilecontrol(Tox *m, int32_t fid, uint8_t rec_sen, uint8_t fnum, uint8_t ctrlty break; case TOX_FILECONTROL_FINISHED: if (rec_sen == 1) { - /* Sending completed */ - printout("Transfer complete\n"); + printout("TX transfer complete\n"); f->t.state = TRANSFER_NONE; free(f->t.buf); f->t.buf = NULL; } else { - /* Receiving completed */ - printout("Transfer complete\n"); + printout("RX transfer complete\n"); tox_file_send_control(tox, f->fid, 1, 0, TOX_FILECONTROL_FINISHED, NULL, 0); if (f->fd[FFILE_OUT] != -1) { close(f->fd[FFILE_OUT]); @@ -1423,6 +1421,8 @@ main(int argc, char *argv[]) signal(SIGTERM, initshutdown); signal(SIGPIPE, SIG_IGN); + setbuf(stdout, NULL); + printrat(); toxinit(); localinit(); |