From bce57fcf67f6f65f201b3c3d8217f43ad339f1cc Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Mon, 10 May 2010 09:16:34 +0000 Subject: [PATCH] --- src/transport/plugin_transport_http.c | 19 +++++++++++++++++++ src/transport/test_plugin_transport_http.c | 4 ++++ 2 files changed, 23 insertions(+) diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c index ab7c0850f..f52702f9c 100644 --- a/src/transport/plugin_transport_http.c +++ b/src/transport/plugin_transport_http.c @@ -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; } diff --git a/src/transport/test_plugin_transport_http.c b/src/transport/test_plugin_transport_http.c index 65c9695c0..3372aad3c 100644 --- a/src/transport/test_plugin_transport_http.c +++ b/src/transport/test_plugin_transport_http.c @@ -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. -- 2.25.1