230 |
if (*ssl) { |
if (*ssl) { |
231 |
|
|
232 |
for (;;) { |
for (;;) { |
233 |
if (SSL_pending(*ssl) |
if (SSL_pending(*ssl) || |
234 |
|| ((s = select(*sock + 1, &fds, NULL, NULL, tvp)) > 0 |
((s = select(*sock + 1, &fds, NULL, NULL, tvp)) > 0 && |
235 |
&& FD_ISSET(*sock, &fds))) |
FD_ISSET(*sock, &fds))) |
236 |
e = SSL_read(*ssl, buf, RESPONSE_BUF - 1); |
e = SSL_read(*ssl, buf, RESPONSE_BUF - 1); |
237 |
|
|
238 |
if (e > 0) |
if (e > 0) |
253 |
} |
} |
254 |
} else |
} else |
255 |
#endif |
#endif |
256 |
if ((s = select(*sock + 1, &fds, NULL, NULL, tvp)) > 0 |
if ((s = select(*sock + 1, &fds, NULL, NULL, tvp)) > 0 && |
257 |
&& FD_ISSET(*sock, &fds)) |
FD_ISSET(*sock, &fds)) |
258 |
e = read(*sock, buf, RESPONSE_BUF - 1); |
e = read(*sock, buf, RESPONSE_BUF - 1); |
259 |
|
|
260 |
if (e == -1) |
if (e == -1) |
305 |
#ifdef SSL_TLS |
#ifdef SSL_TLS |
306 |
if (*ssl) { |
if (*ssl) { |
307 |
for (;;) { |
for (;;) { |
308 |
if ((s = select(*sock + 1, NULL, &fds, NULL, tvp) > 0 |
if ((s = select(*sock + 1, NULL, &fds, NULL, tvp) > 0 && |
309 |
&& FD_ISSET(*sock, &fds))) |
FD_ISSET(*sock, &fds))) |
310 |
e = SSL_write(*ssl, data, strlen(data)); |
e = SSL_write(*ssl, data, strlen(data)); |
311 |
|
|
312 |
if (e > 0) |
if (e > 0) |
327 |
} |
} |
328 |
} else |
} else |
329 |
#endif |
#endif |
330 |
if ((s = select(*sock + 1, NULL, &fds, NULL, tvp)) > 0 |
if ((s = select(*sock + 1, NULL, &fds, NULL, tvp)) > 0 && |
331 |
&& FD_ISSET(*sock, &fds)) |
FD_ISSET(*sock, &fds)) |
332 |
e = write(*sock, data, strlen(data)); |
e = write(*sock, data, strlen(data)); |
333 |
|
|
334 |
if (e == -1) |
if (e == -1) |