From 8a1f6c136a94f322b06dec615df4b0f7cd73a671 Mon Sep 17 00:00:00 2001 From: mrcsys Date: Fri, 6 Jan 2006 15:16:03 +0000 Subject: Updated to take the HAVE_SSL define and act accordingly --- nanohttp/nanohttp-server.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'nanohttp/nanohttp-server.c') diff --git a/nanohttp/nanohttp-server.c b/nanohttp/nanohttp-server.c index 38c19cc..0ff7d08 100644 --- a/nanohttp/nanohttp-server.c +++ b/nanohttp/nanohttp-server.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: nanohttp-server.c,v 1.36 2005/12/22 21:59:41 mrcsys Exp $ +* $Id: nanohttp-server.c,v 1.37 2006/01/06 15:16:03 mrcsys Exp $ * * CSOAP Project: A http client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -101,7 +101,9 @@ static void WSAReaper(void *x); sigset_t thrsigset; #endif +#ifdef HAVE_SSL extern SSL_CTX* SSLctx; +#endif /* @@ -445,6 +447,7 @@ httpd_session_main (void *data) len = 0; log_verbose1 ("starting httpd_session_main()"); +#ifdef HAVE_SSL if( !SSLctx ){ log_verbose1("Using HTTP"); } else { @@ -455,6 +458,7 @@ httpd_session_main (void *data) return herror_new("hsocket_accept", SSL_ERROR_INIT, "Unable to initialize SSL"); } } +#endif conn->atime = time ((time_t) 0); /* call the service */ /* req = hrequest_new_from_buffer (header);*/ @@ -774,7 +778,9 @@ httpd_run () if (err != H_OK && herror_code(err) == SSL_ERROR_INIT) { hsocket_close(conn->sock); conn->sock.sock = -1; +#ifdef HAVE_SSL conn->sock.ssl = NULL; +#endif log_error1(herror_message(err)); continue; } else if (err != H_OK) -- cgit v1.1-32-gdbae