while (1)
{
+ FD_ZERO (&readfds);
FD_SET (tls_fd, &readfds);
FD_SET (in, &readfds);
if (select (tls_fd+1, &readfds, NULL, NULL, NULL) == -1
goto finish;
for (retry = buffer; nbuffer > 0; nbuffer -= wrote, retry += wrote)
{
+ FD_ZERO (&writefds);
FD_SET (tls_fd, &writefds);
if (select (tls_fd+1, NULL, &writefds, NULL, NULL) == -1)
{
goto finish;
for (retry = buffer; nbuffer > 0; nbuffer -= wrote, retry += wrote)
{
+ FD_ZERO (&writefds);
FD_SET (out, &writefds);
if (select (out+1, NULL, &writefds, NULL, NULL) == -1)
{