From 5b35a46df151b71b503dc1c22f580af1036d1e99 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 8 Dec 2013 23:52:42 +0000 Subject: [PATCH] -assert MHD_VERSION is always above 09E00, remove dead struct --- src/transport/plugin_transport_http.c | 37 +++----------------- src/transport/plugin_transport_http_server.c | 2 -- 2 files changed, 4 insertions(+), 35 deletions(-) diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c index 979978e73..42743fc96 100644 --- a/src/transport/plugin_transport_http.c +++ b/src/transport/plugin_transport_http.c @@ -52,36 +52,6 @@ struct HttpAddressWrapper struct HttpAddress *addr; }; -/** - * Context for address to string conversion. - */ -struct PrettyPrinterContext -{ - /** - * Function to call with the result. - */ - GNUNET_TRANSPORT_AddressStringCallback asc; - - /** - * Plugin - */ - struct Plugin *plugin; - - /** - * Clsoure for 'asc'. - */ - void *asc_cls; - - /** - * Port to add after the IP address. - */ - uint16_t port; - - uint32_t addrlen; - - int numeric; -}; - /** * Encapsulation of all of the state of the plugin. @@ -106,6 +76,7 @@ reschedule_session_timeout (struct Session *s); static void stop_session_timeout (struct Session *s); + /** * Convert the transports address to a nice, human-readable * format. @@ -118,7 +89,7 @@ stop_session_timeout (struct Session *s); * @param numeric should (IP) addresses be displayed in numeric form? * @param timeout after how long should we give up? * @param asc function to call on each string - * @param asc_cls closure for asc + * @param asc_cls closure for @a asc */ static void http_plugin_address_pretty_printer (void *cls, const char *type, @@ -128,9 +99,9 @@ http_plugin_address_pretty_printer (void *cls, const char *type, GNUNET_TRANSPORT_AddressStringCallback asc, void *asc_cls) { - GNUNET_assert (cls != NULL); - struct HttpAddress *haddr = (struct HttpAddress *) addr; + const struct HttpAddress *haddr = addr; + GNUNET_assert (cls != NULL); if (addrlen < (sizeof (struct HttpAddress))) { /* invalid address */ diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c index a1c321d1f..6d706efba 100644 --- a/src/transport/plugin_transport_http_server.c +++ b/src/transport/plugin_transport_http_server.c @@ -1177,7 +1177,6 @@ server_lookup_connection (struct HTTP_Server_Plugin *plugin, plugin->env->session_start (NULL, &s->target, PLUGIN_NAME, NULL, 0 ,s, NULL, 0); } -#if MHD_VERSION >= 0x00090E00 if ((NULL == s->server_recv) || (NULL == s->server_send)) { to = (HTTP_SERVER_NOT_VALIDATED_TIMEOUT.rel_value_us / 1000LL / 1000LL); @@ -1196,7 +1195,6 @@ server_lookup_connection (struct HTTP_Server_Plugin *plugin, GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, "Setting timeout for %p to %u sec.\n", sc, to); -#endif return sc; } -- 2.25.1