fix
[oweals/gnunet.git] / src / transport / plugin_transport_http_common.h
index ff2fcc41f0c34c2534613e30894b48040e4476c1..edb99c5f2800a1cc7f1257f7d5eedb7bf148cc49 100644 (file)
 #include "platform.h"
 #include "gnunet_common.h"
 
-#if 0
-GNUNET_NETWORK_STRUCT_BEGIN
 /**
- * HTTP addresses including a full URI
+ * Timeout values for testing
  */
-struct HttpAddress
-{
-  /**
-   * Address following
-   */
-  char *address GNUNET_PACKED;
-};
-GNUNET_NETWORK_STRUCT_END
+#define TESTING GNUNET_YES
+
+#if TESTING
+
+#define HTTP_SERVER_NOT_VALIDATED_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 3)
+#define HTTP_CLIENT_NOT_VALIDATED_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 3)
+#define CLIENT_SESSION_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 7)
+#define SERVER_SESSION_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 7)
+#define TIMEOUT_LOG GNUNET_ERROR_TYPE_DEBUG
+
+#else
+
+#define HTTP_SERVER_NOT_VALIDATED_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 15)
+#define HTTP_CLIENT_NOT_VALIDATED_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 15)
+#define CLIENT_SESSION_TIMEOUT GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT
+#define SERVER_SESSION_TIMEOUT GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT
+#define TIMEOUT_LOG GNUNET_ERROR_TYPE_DEBUG
+
 #endif
 
 /**
@@ -133,5 +141,5 @@ http_common_address_get_size (void *addr);
  * @return GNUNET_YES if equal, GNUNET_NO else
  */
 size_t
-http_common_cmp_addresses (void *addr1, size_t addrlen1, void *addr2, size_t addrlen2);
+http_common_cmp_addresses (const void *addr1, size_t addrlen1, const void *addr2, size_t addrlen2);
 /* end of plugin_transport_http_common.c */