From 93629efe92e7a757953286f6580399fece398801 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Mon, 20 Sep 2010 10:12:30 +0000 Subject: [PATCH] removed malloc from curl_logger --- src/transport/plugin_transport_http.c | 8 ++++---- 1 file 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 @@ #endif #define DEBUG_HTTP GNUNET_NO -#define DEBUG_CURL GNUNET_YES -#define DEBUG_MHD GNUNET_YES +#define DEBUG_CURL GNUNET_NO +#define DEBUG_MHD GNUNET_NO #define DEBUG_CONNECTIONS GNUNET_NO #define DEBUG_SESSION_SELECTION GNUNET_NO #define DEBUG_SCHEDULING GNUNET_NO @@ -1722,9 +1722,10 @@ static int curl_schedule(struct Plugin *plugin) */ int curl_logger (CURL * curl, curl_infotype type , char * data, size_t size , void * cls) { + if (type == CURLINFO_TEXT) { - char * text = GNUNET_malloc(size+2); + char text[size+2]; memcpy(text,data,size); if (text[size-1] == '\n') text[size] = '\0'; @@ -1734,7 +1735,6 @@ int curl_logger (CURL * curl, curl_infotype type , char * data, size_t size , vo text[size+1] = '\0'; } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"CURL: Connection %X - %s", cls, text); - GNUNET_free(text); } return 0; } -- 2.25.1