summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2009-04-02 22:19:07 +0000
committerDr. Stephen Henson <steve@openssl.org>2009-04-02 22:19:07 +0000
commitc342341ea1f136aee70e089f78f46e7d4b8a1bed (patch)
tree7a1edbc162e1cf076452899bebb7006d284f3590 /crypto
parent9d396bee8e1247baae68f74cba25f0362f3aa181 (diff)
Ooops, revert patch... due to non-portable gettimeofday call.
Diffstat (limited to 'crypto')
-rw-r--r--crypto/bio/bio.h1
-rw-r--r--crypto/bio/bss_dgram.c36
2 files changed, 0 insertions, 37 deletions
diff --git a/crypto/bio/bio.h b/crypto/bio/bio.h
index 0190c5a020..cecb6a7207 100644
--- a/crypto/bio/bio.h
+++ b/crypto/bio/bio.h
@@ -158,7 +158,6 @@ extern "C" {
#define BIO_CTRL_DGRAM_SET_PEER 44 /* Destination for the data */
-#define BIO_CTRL_DGRAM_SET_TIMEOUT 45
/* modifiers */
#define BIO_FP_READ 0x02
diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c
index 092709a228..c3da6dc82f 100644
--- a/crypto/bio/bss_dgram.c
+++ b/crypto/bio/bss_dgram.c
@@ -104,8 +104,6 @@ typedef struct bio_dgram_data_st
unsigned int connected;
unsigned int _errno;
unsigned int mtu;
- struct timeval hstimeoutdiff;
- struct timeval hstimeout;
} bio_dgram_data;
BIO_METHOD *BIO_s_datagram(void)
@@ -198,22 +196,6 @@ static int dgram_read(BIO *b, char *out, int outl)
BIO_set_retry_read(b);
data->_errno = get_last_socket_error();
}
- memset(&(data->hstimeout), 0, sizeof(struct timeval));
- }
- else
- {
- if (data->hstimeout.tv_sec > 0 || data->hstimeout.tv_usec > 0)
- {
- struct timeval curtime;
- gettimeofday(&curtime, NULL);
- if (curtime.tv_sec >= data->hstimeout.tv_sec &&
- curtime.tv_usec >= data->hstimeout.tv_usec)
- {
- data->_errno = EAGAIN;
- ret = -1;
- memset(&(data->hstimeout), 0, sizeof(struct timeval));
- }
- }
}
}
return(ret);
@@ -363,23 +345,6 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
memcpy(&(data->peer), to, sizeof(struct sockaddr));
break;
- case BIO_CTRL_DGRAM_SET_TIMEOUT:
- if (num > 0)
- {
- gettimeofday(&(data->hstimeout), NULL);
- data->hstimeout.tv_sec += data->hstimeoutdiff.tv_sec;
- data->hstimeout.tv_usec += data->hstimeoutdiff.tv_usec;
- if (data->hstimeout.tv_usec >= 1000000)
- {
- data->hstimeout.tv_sec++;
- data->hstimeout.tv_usec -= 1000000;
- }
- }
- else
- {
- memset(&(data->hstimeout), 0, sizeof(struct timeval));
- }
- break;
#if defined(SO_RCVTIMEO)
case BIO_CTRL_DGRAM_SET_RECV_TIMEOUT:
#ifdef OPENSSL_SYS_WINDOWS
@@ -395,7 +360,6 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
sizeof(struct timeval)) < 0)
{ perror("setsockopt"); ret = -1; }
#endif
- memcpy(&(data->hstimeoutdiff), ptr, sizeof(struct timeval));
break;
case BIO_CTRL_DGRAM_GET_RECV_TIMEOUT:
#ifdef OPENSSL_SYS_WINDOWS