gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r12363 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r12363 - gnunet/src/transport
Date: Tue, 27 Jul 2010 18:19:07 +0200

Author: wachs
Date: 2010-07-27 18:19:07 +0200 (Tue, 27 Jul 2010)
New Revision: 12363

Modified:
   gnunet/src/transport/plugin_transport_http.c
   gnunet/src/transport/plugin_transport_https.c
   gnunet/src/transport/test_transport_api_rel_http_peer2.conf
Log:


Modified: gnunet/src/transport/plugin_transport_http.c
===================================================================
--- gnunet/src/transport/plugin_transport_http.c        2010-07-27 16:00:11 UTC 
(rev 12362)
+++ gnunet/src/transport/plugin_transport_http.c        2010-07-27 16:19:07 UTC 
(rev 12363)
@@ -1128,8 +1128,7 @@
 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 @@
     }
   }
 
+#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 @@
   }
   if (NULL != tmp)
     GNUNET_free (tmp);
+#endif
 
   return size * nmemb;
 }

Modified: gnunet/src/transport/plugin_transport_https.c
===================================================================
--- gnunet/src/transport/plugin_transport_https.c       2010-07-27 16:00:11 UTC 
(rev 12362)
+++ gnunet/src/transport/plugin_transport_https.c       2010-07-27 16:19:07 UTC 
(rev 12363)
@@ -1134,8 +1134,7 @@
 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 @@
     }
   }
 
+#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 @@
   }
   if (NULL != tmp)
     GNUNET_free (tmp);
+#endif
 
   return size * nmemb;
 }

Modified: gnunet/src/transport/test_transport_api_rel_http_peer2.conf
===================================================================
--- gnunet/src/transport/test_transport_api_rel_http_peer2.conf 2010-07-27 
16:00:11 UTC (rev 12362)
+++ gnunet/src/transport/test_transport_api_rel_http_peer2.conf 2010-07-27 
16:19:07 UTC (rev 12363)
@@ -47,7 +47,7 @@
 [transport]
 PLUGINS = http
 #PLUGINS = tcp http
-DEBUG = YES
+#DEBUG = YES
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
 NEIGHBOUR_LIMIT = 50




reply via email to

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