Package: tsocks Version: 1.8beta5-9.2 Followup-For: Bug #576301 Hi,
Ingo's patch is correct according to my understanding of tsocks' dirty code, note that there also is a related copy/paste error from select() a few lines above, which causes a supplementary poll(_, POLLOUT, _) call. An updated fix is contained in the attached patch. Please include.
--- a/tsocks.c +++ b/tsocks.c @@ -659,10 +659,11 @@ * be ready for writing), otherwise we'll just let the select loop * come around again (since we can't flag it for read, we don't know * if there is any data to be read and can't be bothered checking) */ - if (conn->selectevents & WRITE) { - setevents |= POLLOUT; + if (conn->selectevents & POLLOUT) { + ufds[i].revents |= POLLOUT; nevents++; } + ufds[i].events = conn->selectevents; } } } while (nevents == 0);