aboutsummaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-12-08 23:52:42 +0000
committerChristian Grothoff <christian@grothoff.org>2013-12-08 23:52:42 +0000
commit5b35a46df151b71b503dc1c22f580af1036d1e99 (patch)
tree08e5d1e499dd1d15ee80001577a54536d95bfd74 /src/transport
parent0012a550b5e0981f9da702ba4c5f6478967bb11c (diff)
downloadgnunet-5b35a46df151b71b503dc1c22f580af1036d1e99.tar.gz
gnunet-5b35a46df151b71b503dc1c22f580af1036d1e99.zip
-assert MHD_VERSION is always above 09E00, remove dead struct
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/plugin_transport_http.c37
-rw-r--r--src/transport/plugin_transport_http_server.c2
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
52 struct HttpAddress *addr; 52 struct HttpAddress *addr;
53}; 53};
54 54
55/**
56 * Context for address to string conversion.
57 */
58struct PrettyPrinterContext
59{
60 /**
61 * Function to call with the result.
62 */
63 GNUNET_TRANSPORT_AddressStringCallback asc;
64
65 /**
66 * Plugin
67 */
68 struct Plugin *plugin;
69
70 /**
71 * Clsoure for 'asc'.
72 */
73 void *asc_cls;
74
75 /**
76 * Port to add after the IP address.
77 */
78 uint16_t port;
79
80 uint32_t addrlen;
81
82 int numeric;
83};
84
85 55
86/** 56/**
87 * Encapsulation of all of the state of the plugin. 57 * Encapsulation of all of the state of the plugin.
@@ -106,6 +76,7 @@ reschedule_session_timeout (struct Session *s);
106static void 76static void
107stop_session_timeout (struct Session *s); 77stop_session_timeout (struct Session *s);
108 78
79
109/** 80/**
110 * Convert the transports address to a nice, human-readable 81 * Convert the transports address to a nice, human-readable
111 * format. 82 * format.
@@ -118,7 +89,7 @@ stop_session_timeout (struct Session *s);
118 * @param numeric should (IP) addresses be displayed in numeric form? 89 * @param numeric should (IP) addresses be displayed in numeric form?
119 * @param timeout after how long should we give up? 90 * @param timeout after how long should we give up?
120 * @param asc function to call on each string 91 * @param asc function to call on each string
121 * @param asc_cls closure for asc 92 * @param asc_cls closure for @a asc
122 */ 93 */
123static void 94static void
124http_plugin_address_pretty_printer (void *cls, const char *type, 95http_plugin_address_pretty_printer (void *cls, const char *type,
@@ -128,9 +99,9 @@ http_plugin_address_pretty_printer (void *cls, const char *type,
128 GNUNET_TRANSPORT_AddressStringCallback asc, 99 GNUNET_TRANSPORT_AddressStringCallback asc,
129 void *asc_cls) 100 void *asc_cls)
130{ 101{
131 GNUNET_assert (cls != NULL); 102 const struct HttpAddress *haddr = addr;
132 struct HttpAddress *haddr = (struct HttpAddress *) addr;
133 103
104 GNUNET_assert (cls != NULL);
134 if (addrlen < (sizeof (struct HttpAddress))) 105 if (addrlen < (sizeof (struct HttpAddress)))
135 { 106 {
136 /* invalid address */ 107 /* 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,
1177 plugin->env->session_start (NULL, &s->target, PLUGIN_NAME, NULL, 0 ,s, NULL, 0); 1177 plugin->env->session_start (NULL, &s->target, PLUGIN_NAME, NULL, 0 ,s, NULL, 0);
1178 } 1178 }
1179 1179
1180#if MHD_VERSION >= 0x00090E00
1181 if ((NULL == s->server_recv) || (NULL == s->server_send)) 1180 if ((NULL == s->server_recv) || (NULL == s->server_send))
1182 { 1181 {
1183 to = (HTTP_SERVER_NOT_VALIDATED_TIMEOUT.rel_value_us / 1000LL / 1000LL); 1182 to = (HTTP_SERVER_NOT_VALIDATED_TIMEOUT.rel_value_us / 1000LL / 1000LL);
@@ -1196,7 +1195,6 @@ server_lookup_connection (struct HTTP_Server_Plugin *plugin,
1196 1195
1197 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 1196 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
1198 "Setting timeout for %p to %u sec.\n", sc, to); 1197 "Setting timeout for %p to %u sec.\n", sc, to);
1199#endif
1200 return sc; 1198 return sc;
1201} 1199}
1202 1200