(no commit message)
authorMatthias Wachs <wachs@net.in.tum.de>
Wed, 5 May 2010 13:43:52 +0000 (13:43 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Wed, 5 May 2010 13:43:52 +0000 (13:43 +0000)
src/transport/plugin_transport_http.c
src/transport/test_plugin_transport_http.c

index afcc835beab7009074804a33a200aafe43633e31..a81c1857a3b740e3b90a5eed1986d21b2ba20e99 100644 (file)
@@ -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);
index bb17c049edaa3bae811bf31399730959af9d0dec..a7a2c2cb7d926c23a1d72b30553dcede0308d67b 100644 (file)
@@ -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;
 }