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.
static void
stop_session_timeout (struct Session *s);
+
/**
* Convert the transports address to a nice, human-readable
* format.
* @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,
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 */
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);
GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
"Setting timeout for %p to %u sec.\n", sc, to);
-#endif
return sc;
}