diff options
author | djm <> | 2011-11-03 02:34:33 +0000 |
---|---|---|
committer | djm <> | 2011-11-03 02:34:33 +0000 |
commit | fc7396568e61a510b9336d6c220aaa889c03060f (patch) | |
tree | a8fc08e33aecdd21cb07aa47c8a3a9db715f2ef3 /src/lib/libcrypto/bio/bss_dgram.c | |
parent | 1e8701dd2507fadf6d232d93eb4299a8b79c66d5 (diff) | |
download | openbsd-fc7396568e61a510b9336d6c220aaa889c03060f.tar.gz openbsd-fc7396568e61a510b9336d6c220aaa889c03060f.tar.bz2 openbsd-fc7396568e61a510b9336d6c220aaa889c03060f.zip |
openssl-1.0.0e: resolve conflicts
Diffstat (limited to 'src/lib/libcrypto/bio/bss_dgram.c')
-rw-r--r-- | src/lib/libcrypto/bio/bss_dgram.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/lib/libcrypto/bio/bss_dgram.c b/src/lib/libcrypto/bio/bss_dgram.c index eb7e365467..71ebe987b6 100644 --- a/src/lib/libcrypto/bio/bss_dgram.c +++ b/src/lib/libcrypto/bio/bss_dgram.c | |||
@@ -57,7 +57,6 @@ | |||
57 | * | 57 | * |
58 | */ | 58 | */ |
59 | 59 | ||
60 | #ifndef OPENSSL_NO_DGRAM | ||
61 | 60 | ||
62 | #include <stdio.h> | 61 | #include <stdio.h> |
63 | #include <errno.h> | 62 | #include <errno.h> |
@@ -65,6 +64,7 @@ | |||
65 | #include "cryptlib.h" | 64 | #include "cryptlib.h" |
66 | 65 | ||
67 | #include <openssl/bio.h> | 66 | #include <openssl/bio.h> |
67 | #ifndef OPENSSL_NO_DGRAM | ||
68 | 68 | ||
69 | #if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) | 69 | #if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) |
70 | #include <sys/timeb.h> | 70 | #include <sys/timeb.h> |
@@ -308,7 +308,6 @@ static int dgram_read(BIO *b, char *out, int outl) | |||
308 | OPENSSL_assert(sa.len.s<=sizeof(sa.peer)); | 308 | OPENSSL_assert(sa.len.s<=sizeof(sa.peer)); |
309 | sa.len.i = (int)sa.len.s; | 309 | sa.len.i = (int)sa.len.s; |
310 | } | 310 | } |
311 | dgram_reset_rcv_timeout(b); | ||
312 | 311 | ||
313 | if ( ! data->connected && ret >= 0) | 312 | if ( ! data->connected && ret >= 0) |
314 | BIO_ctrl(b, BIO_CTRL_DGRAM_SET_PEER, 0, &sa.peer); | 313 | BIO_ctrl(b, BIO_CTRL_DGRAM_SET_PEER, 0, &sa.peer); |
@@ -322,6 +321,8 @@ static int dgram_read(BIO *b, char *out, int outl) | |||
322 | data->_errno = get_last_socket_error(); | 321 | data->_errno = get_last_socket_error(); |
323 | } | 322 | } |
324 | } | 323 | } |
324 | |||
325 | dgram_reset_rcv_timeout(b); | ||
325 | } | 326 | } |
326 | return(ret); | 327 | return(ret); |
327 | } | 328 | } |
@@ -340,7 +341,7 @@ static int dgram_write(BIO *b, const char *in, int inl) | |||
340 | 341 | ||
341 | if (data->peer.sa.sa_family == AF_INET) | 342 | if (data->peer.sa.sa_family == AF_INET) |
342 | peerlen = sizeof(data->peer.sa_in); | 343 | peerlen = sizeof(data->peer.sa_in); |
343 | #if OPENSSL_USE_IVP6 | 344 | #if OPENSSL_USE_IPV6 |
344 | else if (data->peer.sa.sa_family == AF_INET6) | 345 | else if (data->peer.sa.sa_family == AF_INET6) |
345 | peerlen = sizeof(data->peer.sa_in6); | 346 | peerlen = sizeof(data->peer.sa_in6); |
346 | #endif | 347 | #endif |
@@ -745,9 +746,13 @@ static int BIO_dgram_should_retry(int i) | |||
745 | { | 746 | { |
746 | err=get_last_socket_error(); | 747 | err=get_last_socket_error(); |
747 | 748 | ||
748 | #if defined(OPENSSL_SYS_WINDOWS) && 0 /* more microsoft stupidity? perhaps not? Ben 4/1/99 */ | 749 | #if defined(OPENSSL_SYS_WINDOWS) |
749 | if ((i == -1) && (err == 0)) | 750 | /* If the socket return value (i) is -1 |
750 | return(1); | 751 | * and err is unexpectedly 0 at this point, |
752 | * the error code was overwritten by | ||
753 | * another system call before this error | ||
754 | * handling is called. | ||
755 | */ | ||
751 | #endif | 756 | #endif |
752 | 757 | ||
753 | return(BIO_dgram_non_fatal_error(err)); | 758 | return(BIO_dgram_non_fatal_error(err)); |
@@ -810,7 +815,6 @@ int BIO_dgram_non_fatal_error(int err) | |||
810 | } | 815 | } |
811 | return(0); | 816 | return(0); |
812 | } | 817 | } |
813 | #endif | ||
814 | 818 | ||
815 | static void get_current_time(struct timeval *t) | 819 | static void get_current_time(struct timeval *t) |
816 | { | 820 | { |
@@ -828,3 +832,5 @@ static void get_current_time(struct timeval *t) | |||
828 | gettimeofday(t, NULL); | 832 | gettimeofday(t, NULL); |
829 | #endif | 833 | #endif |
830 | } | 834 | } |
835 | |||
836 | #endif | ||