aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2010-09-20 10:12:30 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2010-09-20 10:12:30 +0000
commit93629efe92e7a757953286f6580399fece398801 (patch)
tree79ff3ea1b64a18a7d942c401f85cc49ba00a3a27 /src
parent59f3b502b217de8f28b4071eac6928cadcad895b (diff)
downloadgnunet-93629efe92e7a757953286f6580399fece398801.tar.gz
gnunet-93629efe92e7a757953286f6580399fece398801.zip
removed malloc from curl_logger
Diffstat (limited to 'src')
-rw-r--r--src/transport/plugin_transport_http.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c
index 726ec4b7e..6af53332a 100644
--- a/src/transport/plugin_transport_http.c
+++ b/src/transport/plugin_transport_http.c
@@ -53,8 +53,8 @@
53#endif 53#endif
54 54
55#define DEBUG_HTTP GNUNET_NO 55#define DEBUG_HTTP GNUNET_NO
56#define DEBUG_CURL GNUNET_YES 56#define DEBUG_CURL GNUNET_NO
57#define DEBUG_MHD GNUNET_YES 57#define DEBUG_MHD GNUNET_NO
58#define DEBUG_CONNECTIONS GNUNET_NO 58#define DEBUG_CONNECTIONS GNUNET_NO
59#define DEBUG_SESSION_SELECTION GNUNET_NO 59#define DEBUG_SESSION_SELECTION GNUNET_NO
60#define DEBUG_SCHEDULING GNUNET_NO 60#define DEBUG_SCHEDULING GNUNET_NO
@@ -1722,9 +1722,10 @@ static int curl_schedule(struct Plugin *plugin)
1722 */ 1722 */
1723int curl_logger (CURL * curl, curl_infotype type , char * data, size_t size , void * cls) 1723int curl_logger (CURL * curl, curl_infotype type , char * data, size_t size , void * cls)
1724{ 1724{
1725
1725 if (type == CURLINFO_TEXT) 1726 if (type == CURLINFO_TEXT)
1726 { 1727 {
1727 char * text = GNUNET_malloc(size+2); 1728 char text[size+2];
1728 memcpy(text,data,size); 1729 memcpy(text,data,size);
1729 if (text[size-1] == '\n') 1730 if (text[size-1] == '\n')
1730 text[size] = '\0'; 1731 text[size] = '\0';
@@ -1734,7 +1735,6 @@ int curl_logger (CURL * curl, curl_infotype type , char * data, size_t size , vo
1734 text[size+1] = '\0'; 1735 text[size+1] = '\0';
1735 } 1736 }
1736 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"CURL: Connection %X - %s", cls, text); 1737 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"CURL: Connection %X - %s", cls, text);
1737 GNUNET_free(text);
1738 } 1738 }
1739 return 0; 1739 return 0;
1740} 1740}