From: Matthias Wachs Date: Tue, 27 Jul 2010 16:19:07 +0000 (+0000) Subject: (no commit message) X-Git-Tag: initial-import-from-subversion-38251~20838 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=29ee629d64131c960d070b47b2a0b3b8980eb8cd;p=oweals%2Fgnunet.git --- diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c index d237f0d06..99b6053cf 100644 --- a/src/transport/plugin_transport_http.c +++ b/src/transport/plugin_transport_http.c @@ -1128,8 +1128,7 @@ static void http_server_daemon_v6_run (void *cls, static size_t curl_get_header_cb( void *ptr, size_t size, size_t nmemb, void *stream) { struct Session * ps = stream; - char * tmp; - size_t len = size * nmemb; + long http_result = 0; int res; /* Getting last http result code */ @@ -1152,6 +1151,9 @@ static size_t curl_get_header_cb( void *ptr, size_t size, size_t nmemb, void *st } } +#if DEBUG_CURL + char * tmp; + size_t len = size * nmemb; tmp = NULL; if ((size * nmemb) < SIZE_MAX) tmp = GNUNET_malloc (len+1); @@ -1168,6 +1170,7 @@ static size_t curl_get_header_cb( void *ptr, size_t size, size_t nmemb, void *st } if (NULL != tmp) GNUNET_free (tmp); +#endif return size * nmemb; } diff --git a/src/transport/plugin_transport_https.c b/src/transport/plugin_transport_https.c index befab118e..c1a3fc9ac 100644 --- a/src/transport/plugin_transport_https.c +++ b/src/transport/plugin_transport_https.c @@ -1134,8 +1134,7 @@ static void http_server_daemon_v6_run (void *cls, static size_t curl_get_header_cb( void *ptr, size_t size, size_t nmemb, void *stream) { struct Session * ps = stream; - char * tmp; - size_t len = size * nmemb; + long http_result = 0; int res; /* Getting last http result code */ @@ -1158,6 +1157,10 @@ static size_t curl_get_header_cb( void *ptr, size_t size, size_t nmemb, void *st } } +#if DEBUG_CURL + char * tmp; + size_t len = size * nmemb; + tmp = NULL; if ((size * nmemb) < SIZE_MAX) tmp = GNUNET_malloc (len+1); @@ -1176,6 +1179,7 @@ static size_t curl_get_header_cb( void *ptr, size_t size, size_t nmemb, void *st } if (NULL != tmp) GNUNET_free (tmp); +#endif return size * nmemb; } diff --git a/src/transport/test_transport_api_rel_http_peer2.conf b/src/transport/test_transport_api_rel_http_peer2.conf index 7b4c7cc49..d63f905a6 100644 --- a/src/transport/test_transport_api_rel_http_peer2.conf +++ b/src/transport/test_transport_api_rel_http_peer2.conf @@ -47,7 +47,7 @@ MINIMUM-FRIENDS = 0 [transport] PLUGINS = http #PLUGINS = tcp http -DEBUG = YES +#DEBUG = YES ACCEPT_FROM6 = ::1; ACCEPT_FROM = 127.0.0.1; NEIGHBOUR_LIMIT = 50