diff options
author | Rich Salz <rsalz@akamai.com> | 2016-02-27 13:24:28 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-02-27 13:41:41 -0500 |
commit | ba8108154dafb081b510cc628783c6b44c95cb0e (patch) | |
tree | fd56e4516dd3035b6a3bef7025ce22970a72b9f5 /apps/s_client.c | |
parent | 6ab364149d8b76b5d2341a2e708e727cad060416 (diff) |
RT2275: use BIO_sock_nbio()
Now that BIO_sock_nbio is available, use it in the apps.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'apps/s_client.c')
-rw-r--r-- | apps/s_client.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/apps/s_client.c b/apps/s_client.c index 9889cb0355..85fca1fc4e 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -168,11 +168,6 @@ typedef unsigned int u_int; #include "s_apps.h" #include "timeouts.h" -#if (defined(OPENSSL_SYS_VMS) && __VMS_VER < 70000000) -/* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */ -# undef FIONBIO -#endif - #if defined(__has_feature) # if __has_feature(memory_sanitizer) # include <sanitizer/msan_interface.h> @@ -792,9 +787,7 @@ OPTIONS s_client_options[] = { #ifdef WATT32 {"wdebug", OPT_WDEBUG, '-', "WATT-32 tcp debugging"}, #endif -#ifdef FIONBIO {"nbio", OPT_NBIO, '-', "Use non-blocking IO"}, -#endif #ifndef OPENSSL_NO_PSK {"psk_identity", OPT_PSK_IDENTITY, 's', "PSK identity"}, {"psk", OPT_PSK, 's', "PSK in hex (without 0x)"}, @@ -1705,16 +1698,13 @@ int s_client_main(int argc, char **argv) } BIO_printf(bio_c_out, "CONNECTED(%08X)\n", s); -#ifdef FIONBIO if (c_nbio) { - unsigned long l = 1; - BIO_printf(bio_c_out, "turning on non blocking io\n"); - if (BIO_socket_ioctl(s, FIONBIO, &l) < 0) { + if (!BIO_socket_nbio(s, 1)) { ERR_print_errors(bio_err); goto end; } + BIO_printf(bio_c_out, "Turned on non blocking io\n"); } -#endif if (socket_type == SOCK_DGRAM) { sbio = BIO_new_dgram(s, BIO_NOCLOSE); |