(no commit message)
authorMatthias Wachs <wachs@net.in.tum.de>
Mon, 10 May 2010 09:16:34 +0000 (09:16 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Mon, 10 May 2010 09:16:34 +0000 (09:16 +0000)
src/transport/plugin_transport_http.c
src/transport/test_plugin_transport_http.c

index ab7c0850f533ddba9c4c40cf026b0b0232fde616..f52702f9c60e8dd57bc93d97c4e52cf0c41e668c 100644 (file)
@@ -284,6 +284,25 @@ libgnunet_plugin_transport_http_init (void *cls)
   api->address_pretty_printer = &template_plugin_address_pretty_printer;
   api->check_address = &template_plugin_address_suggested;
   api->address_to_string = &template_plugin_address_to_string;
+
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Starting http plugin...\n");
+  /* Reading port number from config file */
+  if ((GNUNET_OK !=
+       GNUNET_CONFIGURATION_get_value_number (env->cfg,
+                                              "transport-http",
+                                              "PORT",
+                                              &port)) ||
+      (port > 65535) )
+    {
+      GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR,
+                       "http",
+                       _
+                       ("Require valid port number for service `%s' in configuration!\n"),
+                       "transport-http");
+      libgnunet_plugin_transport_http_done (api);
+      return NULL;
+    }
+
   return api;
 }
 
index 65c9695c09a539b3ba5f67c614efeca6b032f20b..3372aad3cdc4559147f8346547be94635354b14a 100644 (file)
@@ -185,6 +185,7 @@ setup_plugin_environment ()
   env.max_connections = max_connect_per_transport;
 }
 
+#if 0
 static int
 process_stat (void *cls,
               const char *subsystem,
@@ -208,7 +209,9 @@ process_stat (void *cls,
     }
   return GNUNET_YES;
 }
+#endif
 
+#if 0
 static void
 cont_func (void *cls, int success)
 {
@@ -248,6 +251,7 @@ task_check_stat (void *cls,
   ti_check_stat = GNUNET_SCHEDULER_add_delayed (sched, STAT_INTERVALL, &task_check_stat, NULL);
   return;
 }
+#endif
 
 /**
  * Runs the test.