aboutsummaryrefslogtreecommitdiffstats
path: root/transact.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2011-05-26 01:29:34 +0200
committerMatthias Andree <matthias.andree@gmx.de>2011-05-26 02:00:30 +0200
commitcc9397414a655cab4c47de6559e69ecda06530cc (patch)
treea3487afc29da036c58b9d321804571fbfae2f72a /transact.c
parentce36699e50f90ae17577dfd81be78f6c1b883aec (diff)
downloadfetchmail-cc9397414a655cab4c47de6559e69ecda06530cc.tar.gz
fetchmail-cc9397414a655cab4c47de6559e69ecda06530cc.tar.bz2
fetchmail-cc9397414a655cab4c47de6559e69ecda06530cc.zip
Revert SO_???TIMEO-based STARTTLS timeout handling.
This reverts commits 47c05b10018f5ec7493e4bd9f521aaa18d96f1e2 and 72ce8bce8dd655b6aefa33d0a74e883dad5202b5, the code isn't portable, for instance, Solaris does not support SO_RCVTIMEO/SO_SNDTIMEO. These socket-level options are known, but Solaris returns EAFNOSUPPORT. Reported by Jonathan Buschmann.
Diffstat (limited to 'transact.c')
-rw-r--r--transact.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/transact.c b/transact.c
index 9667bd25..d1e4f6a9 100644
--- a/transact.c
+++ b/transact.c
@@ -487,7 +487,6 @@ int readheaders(int sock,
char *sp, *tp;
set_timeout(mytimeout);
- SockTimeout(sock, mytimeout);
if ((n = SockRead(sock, buf, sizeof(buf)-1)) == -1) {
set_timeout(0);
free(line);
@@ -1409,7 +1408,6 @@ int readbody(int sock, struct query *ctl, flag forward, int len)
while (protocol->delimited || len > 0)
{
set_timeout(mytimeout);
- SockTimeout(sock, mytimeout);
/* XXX FIXME: for undelimited protocols that ship the size, such
* as IMAP, we might want to use the count of remaining characters
* instead of the buffer size -- not for fetchmail 6.3.X though */
@@ -1553,7 +1551,6 @@ va_dcl
va_end(ap);
snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "\r\n");
- SockTimeout(sock, mytimeout);
SockWrite(sock, buf, strlen(buf));
if (outlevel >= O_MONITOR)
@@ -1574,7 +1571,6 @@ int gen_recv(int sock /** socket to which server is connected */,
phase = SERVER_WAIT;
set_timeout(mytimeout);
- SockTimeout(sock, mytimeout);
if (SockRead(sock, buf, size) == -1)
{
set_timeout(0);
@@ -1688,7 +1684,6 @@ int gen_recv_split(int sock /** socket to which server is connected */,
phase = SERVER_WAIT;
set_timeout(mytimeout);
- SockTimeout(sock, mytimeout);
rr = SockRead(sock, buf + n, size - n);
set_timeout(0);
phase = oldphase;
@@ -1760,7 +1755,6 @@ va_dcl
va_end(ap);
snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "\r\n");
- SockTimeout(sock, mytimeout);
ok = SockWrite(sock, buf, strlen(buf));
if (ok == -1 || (size_t)ok != strlen(buf)) {
/* short write, bail out */