[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r27956 - gnunet/src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r27956 - gnunet/src/transport |
Date: |
Fri, 12 Jul 2013 15:43:10 +0200 |
Author: wachs
Date: 2013-07-12 15:43:09 +0200 (Fri, 12 Jul 2013)
New Revision: 27956
Modified:
gnunet/src/transport/plugin_transport_http_client.c
gnunet/src/transport/plugin_transport_http_common.c
gnunet/src/transport/plugin_transport_http_common.h
gnunet/src/transport/plugin_transport_http_server.c
Log:
fix if plugin is loaded only in stub mode
Modified: gnunet/src/transport/plugin_transport_http_client.c
===================================================================
--- gnunet/src/transport/plugin_transport_http_client.c 2013-07-12 13:28:01 UTC
(rev 27955)
+++ gnunet/src/transport/plugin_transport_http_client.c 2013-07-12 13:43:09 UTC
(rev 27956)
@@ -1771,7 +1771,7 @@
const void *addr,
size_t addrlen)
{
- return http_common_plugin_address_to_string (cls, p->protocol, addr,
addrlen);
+ return http_common_plugin_address_to_string (cls, PLUGIN_NAME, addr,
addrlen);
}
/**
Modified: gnunet/src/transport/plugin_transport_http_common.c
===================================================================
--- gnunet/src/transport/plugin_transport_http_common.c 2013-07-12 13:28:01 UTC
(rev 27955)
+++ gnunet/src/transport/plugin_transport_http_common.c 2013-07-12 13:43:09 UTC
(rev 27956)
@@ -266,6 +266,7 @@
const char * addr_str;
char *res;
+ GNUNET_assert (NULL != plugin);
if (NULL == addr)
return NULL;
@@ -277,7 +278,6 @@
if (addr_str[ntohl(address->urlen) -1] != '\0')
return NULL;
-
GNUNET_asprintf (&res, "%s.%u.%s", plugin, ntohl(address->options),
&address[1]);
if (strlen(res) + 1 < 500)
{
Modified: gnunet/src/transport/plugin_transport_http_common.h
===================================================================
--- gnunet/src/transport/plugin_transport_http_common.h 2013-07-12 13:28:01 UTC
(rev 27955)
+++ gnunet/src/transport/plugin_transport_http_common.h 2013-07-12 13:43:09 UTC
(rev 27956)
@@ -34,7 +34,6 @@
#define TESTING GNUNET_NO
#if TESTING
-
#define HTTP_SERVER_NOT_VALIDATED_TIMEOUT GNUNET_TIME_relative_multiply
(GNUNET_TIME_UNIT_SECONDS, 3)
#define HTTP_CLIENT_NOT_VALIDATED_TIMEOUT GNUNET_TIME_relative_multiply
(GNUNET_TIME_UNIT_SECONDS, 3)
#define CLIENT_SESSION_TIMEOUT GNUNET_TIME_relative_multiply
(GNUNET_TIME_UNIT_SECONDS, 7)
@@ -43,6 +42,12 @@
#else
+#if BUILD_HTTPS
+#define PROTOCOL "https"
+#else
+#define PROTOCOL "http"
+#endif
+
#define HTTP_SERVER_NOT_VALIDATED_TIMEOUT GNUNET_TIME_relative_multiply
(GNUNET_TIME_UNIT_SECONDS, 15)
#define HTTP_CLIENT_NOT_VALIDATED_TIMEOUT GNUNET_TIME_relative_multiply
(GNUNET_TIME_UNIT_SECONDS, 15)
#define CLIENT_SESSION_TIMEOUT GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT
Modified: gnunet/src/transport/plugin_transport_http_server.c
===================================================================
--- gnunet/src/transport/plugin_transport_http_server.c 2013-07-12 13:28:01 UTC
(rev 27955)
+++ gnunet/src/transport/plugin_transport_http_server.c 2013-07-12 13:43:09 UTC
(rev 27956)
@@ -3013,7 +3013,12 @@
const void *addr,
size_t addrlen)
{
- return http_common_plugin_address_to_string (cls, p->protocol, addr,
addrlen);
+#if BUILD_HTTPS
+ return http_common_plugin_address_to_string (cls, PLUGIN_NAME, addr,
addrlen);
+#else
+ return http_common_plugin_address_to_string (cls, PLUGIN_NAME, addr,
addrlen);
+#endif
+
}
/**
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r27956 - gnunet/src/transport,
gnunet <=