summaryrefslogtreecommitdiffstats
path: root/nanohttp/nanohttp-server.c
diff options
context:
space:
mode:
authorGravatar mrcsys2006-01-06 15:16:03 +0000
committerGravatar mrcsys2006-01-06 15:16:03 +0000
commit8a1f6c136a94f322b06dec615df4b0f7cd73a671 (patch)
tree63af13c3f6e406b8aeacf10fcdcdffe64e16349f /nanohttp/nanohttp-server.c
parent73327fb2d2a2da4b25e91e34ca121cac6b03fe42 (diff)
downloadcsoap-8a1f6c136a94f322b06dec615df4b0f7cd73a671.tar.gz
csoap-8a1f6c136a94f322b06dec615df4b0f7cd73a671.tar.bz2
Updated to take the HAVE_SSL define and act accordingly
Diffstat (limited to 'nanohttp/nanohttp-server.c')
-rw-r--r--nanohttp/nanohttp-server.c8
1 files changed, 7 insertions, 1 deletions
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)