From 7aa6c12a4424d00ea0add0a849f8a5b31a2de6a1 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Sat, 28 Aug 2010 20:14:36 +0200 Subject: Clean-up: Remove pthread and mutex locking code This code was not activated at all, and hard coded as disabled in syshead.h with this code snippet: /* * Pthread support is currently experimental (and quite unfinished). */ #if 1 /* JYFIXME -- if defined, disable pthread */ #undef USE_PTHREAD #endif So no matter if --enable-pthread when running ./configure or not, this feature was never enabled in reality. Further, by removing the blocker code above made OpenVPN uncompilable in the current state. As the threading part needs to be completely rewritten and pthreading will not be supported in OpenVPN 2.x, removing this code seems most reasonable. In addition, a lot of mutex locking code was also removed, as they were practically NOP functions, due to pthreading being forcefully disabled Signed-off-by: David Sommerseth Acked-by: James Yonan --- ssl.c | 1 - 1 file changed, 1 deletion(-) (limited to 'ssl.c') diff --git a/ssl.c b/ssl.c index 9780a67..5809f94 100644 --- a/ssl.c +++ b/ssl.c @@ -39,7 +39,6 @@ #include "common.h" #include "integer.h" #include "socket.h" -#include "thread.h" #include "misc.h" #include "fdmisc.h" #include "interval.h" -- cgit From cc88a2695f4a54e27143efeae62de24fec8e26a1 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Sat, 28 Aug 2010 20:44:07 +0200 Subject: Clean-up: Remove more dead and inactive code paths These code paths was practically not needed with no locking mechanisms enabled and was just bloating the source code. Signed-off-by: David Sommerseth Acked-by: James Yonan --- ssl.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'ssl.c') diff --git a/ssl.c b/ssl.c index 5809f94..c05d34f 100644 --- a/ssl.c +++ b/ssl.c @@ -3814,8 +3814,6 @@ tls_process (struct tls_multi *multi, msg (D_TLS_DEBUG_LOW, "TLS: tls_process: killed expiring key"); } - /*mutex_cycle (multi->mutex);*/ - do { update_time (); @@ -4099,7 +4097,6 @@ tls_process (struct tls_multi *multi, } } } - /*mutex_cycle (multi->mutex);*/ } while (state_change); @@ -4253,7 +4250,6 @@ tls_multi_process (struct tls_multi *multi, reset_session (multi, session); } } - /*mutex_cycle (multi->mutex);*/ } update_time (); -- cgit From 33ee747fff4acb4ea4c143089aa2c596a1e4d0bd Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Mon, 15 Nov 2010 08:53:40 +0100 Subject: Fixed potential misinterpretation of boolean logic The GNU C compiler warned about a potential issue with an if() expression missing an extra set of parentheses. Signed-off-by: David Sommerseth Acked-by: Peter Stuge --- ssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ssl.c') diff --git a/ssl.c b/ssl.c index c05d34f..8644ae4 100644 --- a/ssl.c +++ b/ssl.c @@ -940,7 +940,7 @@ verify_callback (int preverify_ok, X509_STORE_CTX * ctx) if (opt->verify_export_cert) { gc = gc_new(); - if (tmp_file=get_peer_cert(ctx, opt->verify_export_cert,&gc)) + if ((tmp_file=get_peer_cert(ctx, opt->verify_export_cert,&gc))) { setenv_str(opt->es, "peer_cert", tmp_file); } -- cgit