summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsin <sin@2f30.org>2014-09-24 17:05:08 +0100
committersin <sin@2f30.org>2014-09-24 17:05:08 +0100
commit8fdbe6c876e9e2358c3b045c1ad6edd4a34a7436 (patch)
tree6c3be2bce5805fe35c575193f0f7431db95e2ee7
parentc28164d21d377a4e5327ddcc2bedc9cd356f772a (diff)
Use unbuffered stdout
-rw-r--r--ratox.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ratox.c b/ratox.c
index 00f609d..405c170 100644
--- a/ratox.c
+++ b/ratox.c
@@ -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();