aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/transport/plugin_transport_http.c7
-rw-r--r--src/transport/plugin_transport_https.c8
-rw-r--r--src/transport/test_transport_api_rel_http_peer2.conf2
3 files changed, 12 insertions, 5 deletions
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,
1128static size_t curl_get_header_cb( void *ptr, size_t size, size_t nmemb, void *stream) 1128static size_t curl_get_header_cb( void *ptr, size_t size, size_t nmemb, void *stream)
1129{ 1129{
1130 struct Session * ps = stream; 1130 struct Session * ps = stream;
1131 char * tmp; 1131
1132 size_t len = size * nmemb;
1133 long http_result = 0; 1132 long http_result = 0;
1134 int res; 1133 int res;
1135 /* Getting last http result code */ 1134 /* 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
1152 } 1151 }
1153 } 1152 }
1154 1153
1154#if DEBUG_CURL
1155 char * tmp;
1156 size_t len = size * nmemb;
1155 tmp = NULL; 1157 tmp = NULL;
1156 if ((size * nmemb) < SIZE_MAX) 1158 if ((size * nmemb) < SIZE_MAX)
1157 tmp = GNUNET_malloc (len+1); 1159 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
1168 } 1170 }
1169 if (NULL != tmp) 1171 if (NULL != tmp)
1170 GNUNET_free (tmp); 1172 GNUNET_free (tmp);
1173#endif
1171 1174
1172 return size * nmemb; 1175 return size * nmemb;
1173} 1176}
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,
1134static size_t curl_get_header_cb( void *ptr, size_t size, size_t nmemb, void *stream) 1134static size_t curl_get_header_cb( void *ptr, size_t size, size_t nmemb, void *stream)
1135{ 1135{
1136 struct Session * ps = stream; 1136 struct Session * ps = stream;
1137 char * tmp; 1137
1138 size_t len = size * nmemb;
1139 long http_result = 0; 1138 long http_result = 0;
1140 int res; 1139 int res;
1141 /* Getting last http result code */ 1140 /* 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
1158 } 1157 }
1159 } 1158 }
1160 1159
1160#if DEBUG_CURL
1161 char * tmp;
1162 size_t len = size * nmemb;
1163
1161 tmp = NULL; 1164 tmp = NULL;
1162 if ((size * nmemb) < SIZE_MAX) 1165 if ((size * nmemb) < SIZE_MAX)
1163 tmp = GNUNET_malloc (len+1); 1166 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
1176 } 1179 }
1177 if (NULL != tmp) 1180 if (NULL != tmp)
1178 GNUNET_free (tmp); 1181 GNUNET_free (tmp);
1182#endif
1179 1183
1180 return size * nmemb; 1184 return size * nmemb;
1181} 1185}
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
47[transport] 47[transport]
48PLUGINS = http 48PLUGINS = http
49#PLUGINS = tcp http 49#PLUGINS = tcp http
50DEBUG = YES 50#DEBUG = YES
51ACCEPT_FROM6 = ::1; 51ACCEPT_FROM6 = ::1;
52ACCEPT_FROM = 127.0.0.1; 52ACCEPT_FROM = 127.0.0.1;
53NEIGHBOUR_LIMIT = 50 53NEIGHBOUR_LIMIT = 50