gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r7308 - in libmicrohttpd: . src/daemon src/examples


From: gnunet
Subject: [GNUnet-SVN] r7308 - in libmicrohttpd: . src/daemon src/examples
Date: Sun, 22 Jun 2008 18:28:02 -0600 (MDT)

Author: lv-426
Date: 2008-06-22 18:28:02 -0600 (Sun, 22 Jun 2008)
New Revision: 7308

Modified:
   libmicrohttpd/configure.ac
   libmicrohttpd/src/daemon/Makefile.am
   libmicrohttpd/src/daemon/connection.h
   libmicrohttpd/src/daemon/daemon.c
   libmicrohttpd/src/daemon/internal.h
   libmicrohttpd/src/examples/Makefile.am
   libmicrohttpd/src/examples/https_server_example.c
Log:
support for a non HTTPS build

Modified: libmicrohttpd/configure.ac
===================================================================
--- libmicrohttpd/configure.ac  2008-06-22 18:46:25 UTC (rev 7307)
+++ libmicrohttpd/configure.ac  2008-06-23 00:28:02 UTC (rev 7308)
@@ -153,6 +153,7 @@
 else
  AC_DEFINE([HTTPS_SUPPORT],[1],[Include HTTPS support]) 
 fi
+AM_CONDITIONAL(ENABLE_HTTPS, test "$enable_HTTPS" = "yes")
 
 # Symbols required by GNU_TLS 
 AC_DEFINE([ENABLE_MINITASN1],[1],[Include minitasn1 support])

Modified: libmicrohttpd/src/daemon/Makefile.am
===================================================================
--- libmicrohttpd/src/daemon/Makefile.am        2008-06-22 18:46:25 UTC (rev 
7307)
+++ libmicrohttpd/src/daemon/Makefile.am        2008-06-23 00:28:02 UTC (rev 
7308)
@@ -1,5 +1,9 @@
-SUBDIRS  = https .
+SUBDIRS  = .
 
+if ENABLE_HTTPS
+       SUBDIRS += https
+endif
+
 AM_CPPFLAGS = -I$(top_srcdir)/src/include \
 -I$(top_srcdir)/src/daemon \
 -I$(top_srcdir)/src/daemon/https/lgl \
@@ -31,11 +35,11 @@
 response.c response.h
 libmicrohttpd_la_LDFLAGS = \
   -export-dynamic -version-info 4:3:0 $(retaincommand)
-libmicrohttpd_la_LIBADD = \
-https/libhttps.la 
-
-
  
+if ENABLE_HTTPS
+       libmicrohttpd_la_LIBADD = https/libhttps.la 
+endif
+ 
 check_PROGRAMS = \
   postprocessor_test \
   postprocessor_large_test \

Modified: libmicrohttpd/src/daemon/connection.h
===================================================================
--- libmicrohttpd/src/daemon/connection.h       2008-06-22 18:46:25 UTC (rev 
7307)
+++ libmicrohttpd/src/daemon/connection.h       2008-06-23 00:28:02 UTC (rev 
7308)
@@ -77,7 +77,7 @@
 int MHD_con_read(struct MHD_Connection *connection);
 int MHD_con_write(struct MHD_Connection *connection);
 
-#ifdef HTTPS_SUPPORT
+#if HTTPS_SUPPORT
 int MHDS_connection_handle_read(struct MHD_Connection *connection);
 int MHDS_connection_handle_write(struct MHD_Connection *connection);
 int MHDS_connection_handle_idle(struct MHD_Connection *connection);

Modified: libmicrohttpd/src/daemon/daemon.c
===================================================================
--- libmicrohttpd/src/daemon/daemon.c   2008-06-22 18:46:25 UTC (rev 7307)
+++ libmicrohttpd/src/daemon/daemon.c   2008-06-23 00:28:02 UTC (rev 7308)
@@ -201,6 +201,7 @@
 /**
  * Handle an individual TLS connection.
  */
+#if HTTPS_SUPPORT
 static void *
 MHDS_handle_connection (void *data)
 {
@@ -251,6 +252,7 @@
 
   MHD_handle_connection (data);
 }
+#endif
 
 /**
  * Accept an incoming connection and create the MHD_Connection object for
@@ -410,11 +412,13 @@
   /* attempt to create handler thread */
   if (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION))
     {
+#if HTTPS_SUPPORT
       if (daemon->options & MHD_USE_SSL)
         res_thread_create = pthread_create (&connection->pid, NULL,
                                             &MHDS_handle_connection,
                                             connection);
       else
+#endif        
         {
           res_thread_create = pthread_create (&connection->pid, NULL,
                                               &MHD_handle_connection,
@@ -931,11 +935,13 @@
     }
 
   /* TLS clean up */
+#if HTTPS_SUPPORT  
   if (daemon->options & MHD_USE_SSL)
     {
       gnutls_priority_deinit (daemon->priority_cache);
       gnutls_global_deinit ();
     }
+#endif  
 
   free (daemon);
 }
@@ -947,6 +953,7 @@
   fprintf (stdout, "|<%d>| %s", level, str);
 }
 
+#if HTTPS_SUPPORT
 int
 MHDS_init (struct MHD_Daemon *daemon)
 {
@@ -984,6 +991,7 @@
   // TODO address error case return value
   return 0;
 }
+#endif
 
 #ifndef WINDOWS
 

Modified: libmicrohttpd/src/daemon/internal.h
===================================================================
--- libmicrohttpd/src/daemon/internal.h 2008-06-22 18:46:25 UTC (rev 7307)
+++ libmicrohttpd/src/daemon/internal.h 2008-06-23 00:28:02 UTC (rev 7308)
@@ -642,7 +642,7 @@
      */
   unsigned short port;
 
-#if HTTPS_SUPPORT
+#ifdef HTTPS_SUPPORT
   /* server credintials */
   gnutls_certificate_credentials_t x509_cret;
 

Modified: libmicrohttpd/src/examples/Makefile.am
===================================================================
--- libmicrohttpd/src/examples/Makefile.am      2008-06-22 18:46:25 UTC (rev 
7307)
+++ libmicrohttpd/src/examples/Makefile.am      2008-06-23 00:28:02 UTC (rev 
7308)
@@ -1,16 +1,20 @@
 SUBDIRS  = .
 
-AM_CPPFLAGS = -I$(top_srcdir)/src/include 
+AM_CPPFLAGS = \
+-I$(top_srcdir)/src/include \
+-I$(top_srcdir)/src/https/includes
 
 # example programs
-
 noinst_PROGRAMS = \
-https_server_example \
 minimal_example \
 querystring_example \
 fileserver_example \
 fileserver_example_external_select
 
+if ENABLE_HTTPS
+       noinst_PROGRAMS += https_server_example 
+endif
+
 minimal_example_SOURCES = \
  minimal_example.c 
 minimal_example_LDADD = \
@@ -31,15 +35,11 @@
 fileserver_example_external_select_LDADD = \
  $(top_builddir)/src/daemon/libmicrohttpd.la 
 
+https_server_example_SOURCES = \
+https_server_example.c
 https_server_example_CPPFLAGS = \
- $(GNUTLS_CPPFLAGS) \
+ -I$(top_srcdir)/src/daemon/https/includes \
  -I$(top_srcdir)/src/daemon \
  -I$(top_srcdir)/src/include 
-https_server_example_SOURCES = \
- https_server_example.c
 https_server_example_LDADD = \
  $(top_builddir)/src/daemon/libmicrohttpd.la
-https_server_example_LDFLAGS = \
- -L$(GNUTLS_LIB_PATH) \
- -lgnutls
-

Modified: libmicrohttpd/src/examples/https_server_example.c
===================================================================
--- libmicrohttpd/src/examples/https_server_example.c   2008-06-22 18:46:25 UTC 
(rev 7307)
+++ libmicrohttpd/src/examples/https_server_example.c   2008-06-23 00:28:02 UTC 
(rev 7308)
@@ -44,7 +44,7 @@
 #endif
 #include <string.h>
 #include <stdio.h>
-#include <gnutls/gnutls.h>
+#include "gnutls.h"
 #include <gcrypt.h>
 
 #define BUF_SIZE 1024





reply via email to

[Prev in Thread] Current Thread [Next in Thread]