From 297d0c9ced5c80850f9bf5289194742bcc2ddacc Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Mon, 31 Aug 2020 22:40:22 -0300 Subject: [PATCH] Cleaning up. --- src/core/host.c | 5 ----- src/core/linux/ldap.c | 4 ++-- src/core/windows/ldap.c | 6 +++--- src/include/internals.h | 15 +-------------- src/network_modules/openssl/private.h | 1 + 5 files changed, 7 insertions(+), 24 deletions(-) diff --git a/src/core/host.c b/src/core/host.c index 7548142..167807d 100644 --- a/src/core/host.c +++ b/src/core/host.c @@ -228,10 +228,7 @@ void lib3270_set_disconnected(H3270 *hSession) hSession->kybdlock = LIB3270_KL_NOT_CONNECTED; hSession->starting = 0; - -#if defined(HAVE_LIBSSL) hSession->ssl.state = LIB3270_SSL_UNDEFINED; -#endif // HAVE_LIBSSL set_status(hSession,LIB3270_FLAG_UNDERA,False); @@ -242,9 +239,7 @@ void lib3270_set_disconnected(H3270 *hSession) if(hSession->cbk.update_connect) hSession->cbk.update_connect(hSession,0); -#if defined(HAVE_LIBSSL) hSession->cbk.update_ssl(hSession,hSession->ssl.state); -#endif // HAVE_LIBSSL } diff --git a/src/core/linux/ldap.c b/src/core/linux/ldap.c index 306b221..c34e363 100644 --- a/src/core/linux/ldap.c +++ b/src/core/linux/ldap.c @@ -29,7 +29,7 @@ #include -#if defined(HAVE_LDAP) && defined HAVE_LIBSSL +#if defined(HAVE_LDAP) && defined(HAVE_LIBSSL) #include #include @@ -43,7 +43,7 @@ typedef char LDAPPTR; -/*--[ Implement ]------------------------------------------------------------------------------------*/ +//--[ Implement ]------------------------------------------------------------------------------------ static inline void lib3270_autoptr_cleanup_LDAPMessage(LDAPMessage **message) { diff --git a/src/core/windows/ldap.c b/src/core/windows/ldap.c index 84a1d6a..7537b98 100644 --- a/src/core/windows/ldap.c +++ b/src/core/windows/ldap.c @@ -36,7 +36,7 @@ #include -#if defined(HAVE_LIBSSL) && defined(SSL_ENABLE_CRL_CHECK) && defined(HAVE_LDAP) +#if defined(HAVE_LDAP) && defined(HAVE_LIBSSL) #include "private.h" #include @@ -51,7 +51,7 @@ # include # endif -/*--[ Implement ]------------------------------------------------------------------------------------*/ +//--[ Implement ]------------------------------------------------------------------------------------ static inline void lib3270_autoptr_cleanup_LDAP(LDAP **ptr) { @@ -229,4 +229,4 @@ X509_CRL * lib3270_crl_get_using_ldap(H3270 *hSession, const char *consturl, con } -#endif // defined(HAVE_LIBSSL) && defined(SSL_ENABLE_CRL_CHECK) && defined(HAVE_LDAP) +#endif // defined(HAVE_LIBSSL) && defined(HAVE_LDAP) diff --git a/src/include/internals.h b/src/include/internals.h index aca5e9f..953cd45 100644 --- a/src/include/internals.h +++ b/src/include/internals.h @@ -42,12 +42,6 @@ #include #include -#if defined(HAVE_LIBSSL) - #include - #include - -#endif // HAVE_LIBSSL - #if defined(X3270_TN3270E) && !defined(X3270_ANSI) /*[*/ #define X3270_ANSI 1 /* RFC2355 requires NVT mode */ #endif /*]*/ @@ -56,14 +50,7 @@ #define _GNU_SOURCE /* vasprintf isn't POSIX */ #endif /*]*/ -/* - * gettext stuff - */ -#ifdef ANDROID - #undef HAVE_LIBINTL - #undef HAVE_LIBSSL -#endif - +// gettext stuff #ifdef HAVE_LIBINTL #include #include diff --git a/src/network_modules/openssl/private.h b/src/network_modules/openssl/private.h index 632569b..2ff7014 100644 --- a/src/network_modules/openssl/private.h +++ b/src/network_modules/openssl/private.h @@ -51,6 +51,7 @@ #include #include + #include #include struct _lib3270_network_popup { -- libgit2 0.21.2