From 29ae3278722e4a61905cc5d330fc2d286d2e7016 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 11 Jun 2008 20:08:17 +0200 Subject: [PATCH] Make ssl_check_error static and define ssl_type always. Make ssl_check_error static becuase it's a private function. Define function ssl_type always - also in case SSL is disabled - and make it return 0 (NULL ptr). --- src/tcpip.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/tcpip.c b/src/tcpip.c index ae070d7..6cb4bbe 100644 --- a/src/tcpip.c +++ b/src/tcpip.c @@ -241,10 +241,11 @@ COMSTACK yaz_tcpip_create(int s, int flags, int protocol, } -#if ENABLE_SSL - COMSTACK ssl_type(int s, int flags, int protocol, void *vp) { +#if !ENABLE_SSL + return 0; +#else tcpip_state *sp; COMSTACK p; @@ -260,9 +261,11 @@ COMSTACK ssl_type(int s, int flags, int protocol, void *vp) /* note: we don't handle already opened socket in SSL mode - yet */ return p; +#endif } -int ssl_check_error(COMSTACK h, tcpip_state *sp, int res) +#if !ENABLE_SSL +static int ssl_check_error(COMSTACK h, tcpip_state *sp, int res) { #if HAVE_OPENSSL_SSL_H int err = SSL_get_error(sp->ssl, res); -- 1.7.10.4