[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r11164 - gnunet/src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r11164 - gnunet/src/transport |
Date: |
Mon, 3 May 2010 17:18:51 +0200 |
Author: wachs
Date: 2010-05-03 17:18:51 +0200 (Mon, 03 May 2010)
New Revision: 11164
Modified:
gnunet/src/transport/Makefile.am
gnunet/src/transport/plugin_transport_http.c
gnunet/src/transport/test_plugin_transport_data_http.conf
Log:
Modified: gnunet/src/transport/Makefile.am
===================================================================
--- gnunet/src/transport/Makefile.am 2010-05-03 15:06:36 UTC (rev 11163)
+++ gnunet/src/transport/Makefile.am 2010-05-03 15:18:51 UTC (rev 11164)
@@ -123,6 +123,7 @@
$(top_builddir)/src/hello/libgnunethello.la \
$(top_builddir)/src/statistics/libgnunetstatistics.la \
$(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
+ @LIBCURL@ \
$(top_builddir)/src/util/libgnunetutil.la
libgnunet_plugin_transport_http_la_LDFLAGS = \
$(GN_LIBMHD) \
Modified: gnunet/src/transport/plugin_transport_http.c
===================================================================
--- gnunet/src/transport/plugin_transport_http.c 2010-05-03 15:06:36 UTC
(rev 11163)
+++ gnunet/src/transport/plugin_transport_http.c 2010-05-03 15:18:51 UTC
(rev 11164)
@@ -33,6 +33,7 @@
#include "gnunet_transport_service.h"
#include "plugin_transport.h"
#include "microhttpd.h"
+#include <curl/curl.h>
#define VERBOSE GNUNET_YES
#define DEBUG GNUNET_YES
@@ -138,6 +139,11 @@
static struct MHD_Daemon *http_daemon;
/**
+ * Curl multi for managing client operations.
+ */
+static CURLM *curl_multi;
+
+/**
* Function that can be used by the transport service to transmit
* a message using the plugin.
*
@@ -377,11 +383,14 @@
MHD_OPTION_END);
}
}
- if ( NULL != http_daemon )
+
+ curl_multi = curl_multi_init ();
+
+ if ( (NULL != http_daemon) && (NULL != curl_multi))
return api;
else
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,"Starting MHD on port %u with IPv6
disabled\n",port);
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,"Initializing http plugin failed\n");
return NULL;
}
}
@@ -401,6 +410,10 @@
MHD_stop_daemon (http_daemon);
http_daemon = NULL;
}
+
+ curl_multi_cleanup (curl_multi);
+ curl_multi = NULL;
+
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Shutting down http plugin...\n");
GNUNET_free (plugin);
Modified: gnunet/src/transport/test_plugin_transport_data_http.conf
===================================================================
--- gnunet/src/transport/test_plugin_transport_data_http.conf 2010-05-03
15:06:36 UTC (rev 11163)
+++ gnunet/src/transport/test_plugin_transport_data_http.conf 2010-05-03
15:18:51 UTC (rev 11164)
@@ -5,4 +5,4 @@
[transport-http]
PORT = 12389
DEBUG = YES
-USE_IPV6 = NO
\ No newline at end of file
+USE_IPV6 = YES
\ No newline at end of file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r11164 - gnunet/src/transport,
gnunet <=