diff options
author | z3bra <contactatz3bradotorg> | 2016-11-10 00:04:56 +0100 |
---|---|---|
committer | z3bra <contactatz3bradotorg> | 2016-11-10 00:04:56 +0100 |
commit | c233413ccc73c58def0cd08862972ec824957758 (patch) | |
tree | 4ab9cdbd1fc218b2a5d3c3d2d6315e8256724e16 | |
parent | a8f89c868d992d9772d9a94bbacf1d55225dd187 (diff) |
Remove useless call to FD_CLR()
This snippet was introduced when the client could send too much data to
the core for the transfer.
The new toxcore API introduces a callback triggered when the core is
ready to send more data. It means we don't need to keep track of a
local buffer anymore, and simply read from the file_in FIFO when the
core is ready.
-rw-r--r-- | ratox.c | 17 |
1 files changed, 0 insertions, 17 deletions
@@ -1613,23 +1613,6 @@ loop(void) } } - /* If we hit the receiver too hard, we will run out of - * local buffer slots. In that case tox_file_send_chunk() - * will return -1 and we will have to queue the buffer to - * send it later. If this is the last buffer read from - * the FIFO, then select() won't make the fd readable again - * so we have to check if there's anything pending to be - * sent. - */ - TAILQ_FOREACH(f, &friendhead, entry) { - if (tox_friend_get_connection_status(tox, f->num, NULL) == 0) - continue; - if (f->tx.state != TRANSFER_INPROGRESS) - continue; - if (f->tx.state == TRANSFER_NONE) - FD_CLR(f->fd[FFILE_IN], &rfds); - } - /* Accept pending transfers if any */ TAILQ_FOREACH(f, &friendhead, entry) { if (tox_friend_get_connection_status(tox, f->num, NULL) == 0) |