From 6e90a74a03596037b36d713d66da78c831f83046 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Wed, 5 May 2010 13:43:52 +0000 Subject: [PATCH] --- src/transport/plugin_transport_http.c | 7 ++++--- src/transport/test_plugin_transport_http.c | 13 ++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c index afcc835be..a81c1857a 100644 --- a/src/transport/plugin_transport_http.c +++ b/src/transport/plugin_transport_http.c @@ -325,12 +325,12 @@ accessHandlerCallback (void *cls, /* PUT method here */ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Got PUT Request with size %u \n",upload_data_size); - GNUNET_STATISTICS_update( plugin->env->stats , gettext_noop("# PUT requests"), 1, GNUNET_NO); + // GNUNET_STATISTICS_update( plugin->env->stats , gettext_noop("# PUT requests"), 1, GNUNET_NO); } if ( 0 == strcmp (MHD_HTTP_METHOD_GET, method) ) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Got GET Request with size\n"); - GNUNET_STATISTICS_update( plugin->env->stats , gettext_noop("# GET requests"), 1, GNUNET_NO); + // GNUNET_STATISTICS_update( plugin->env->stats , gettext_noop("# GET requests"), 1, GNUNET_NO); } response = MHD_create_response_from_data (strlen (HTTP_PUT_RESPONSE), @@ -563,13 +563,14 @@ libgnunet_plugin_transport_http_init (void *cls) if (http_daemon_v6 != NULL) http_task_v6 = prepare_daemon (http_daemon_v6); + /* if (NULL == plugin->env->stats) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Failed to retrieve statistics handle\n")); libgnunet_plugin_transport_http_done (api); return NULL; - } + }*/ GNUNET_STATISTICS_set ( env->stats, "# PUT requests", 0, GNUNET_NO); GNUNET_STATISTICS_set ( env->stats, "# GET requests", 0, GNUNET_NO); diff --git a/src/transport/test_plugin_transport_http.c b/src/transport/test_plugin_transport_http.c index bb17c049e..a7a2c2cb7 100644 --- a/src/transport/test_plugin_transport_http.c +++ b/src/transport/test_plugin_transport_http.c @@ -223,14 +223,13 @@ run (void *cls, } - stats = GNUNET_STATISTICS_create (sched, "http-transport", cfg); + // stats = GNUNET_STATISTICS_create (sched, "http-transport", cfg); /* max_connect_per_transport = (uint32_t) tneigh; my_private_key = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile); - */ GNUNET_free (keyfile); - /* + if (my_private_key == NULL) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, @@ -283,7 +282,7 @@ main (int argc, char *const *argv) }; int ret; char *const argv_prog[] = { - "test-gnunetd-plugin-transport_http", + "test_plugin_transport_http", "-c", "test_plugin_transport_data_http.conf", "-L", @@ -294,7 +293,7 @@ main (int argc, char *const *argv) #endif NULL }; - GNUNET_log_setup ("test-gnunetd-plugin-transport_http", + GNUNET_log_setup ("test_plugin_transport_http", #if VERBOSE "DEBUG", #else @@ -305,9 +304,9 @@ main (int argc, char *const *argv) ret = (GNUNET_OK == GNUNET_PROGRAM_run (5, argv_prog, - "test-plugin-transport_http", + "test_plugin_transport_http", "testcase", options, &run, NULL)) ? fail : 1; - GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-plugin-transport_http"); + GNUNET_DISK_directory_remove ("/tmp/test_plugin_transport_http"); return fail; } -- 2.25.1