diff options
author | sin <sin@2f30.org> | 2014-09-13 15:50:45 +0100 |
---|---|---|
committer | sin <sin@2f30.org> | 2014-09-13 15:50:45 +0100 |
commit | f304504138c118cc5d2726d3b9805200c3e4a313 (patch) | |
tree | 10532e9ac38234ee6a230ae6791cd7df1caf99fc /ratatox.c | |
parent | 0c4fe86bba0bbf32112388e62f2856dea218af1a (diff) |
Style fix
Diffstat (limited to 'ratatox.c')
-rw-r--r-- | ratatox.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -242,6 +242,7 @@ cb_status_message(Tox *m, int32_t fid, const uint8_t *data, uint16_t len, void * memcpy(status, data, len); status[len] = '\0'; + TAILQ_FOREACH(f, &friendhead, entry) { if (f->fid == fid) { snprintf(path, sizeof(path), "%s/status", f->idstr); @@ -496,6 +497,7 @@ loop(void) } } tox_do(tox); + FD_ZERO(&rfds); TAILQ_FOREACH(f, &friendhead, entry) { for (i = 0; i < NR_FIFOS; i++) { @@ -504,6 +506,7 @@ loop(void) FD_SET(f->fd[i], &rfds); } } + tv.tv_sec = 0; tv.tv_usec = tox_do_interval(tox) * 1000; n = select(fdmax + 1, &rfds, NULL, NULL, @@ -514,6 +517,7 @@ loop(void) perror("select"); exit(1); } + TAILQ_FOREACH(f, &friendhead, entry) { for (i = 0; i < NR_FIFOS; i++) { if (FD_ISSET(f->fd[i], &rfds) == 0) |