Adding support for other plugins
authorMatthias Wachs <wachs@net.in.tum.de>
Fri, 29 Oct 2010 08:56:09 +0000 (08:56 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Fri, 29 Oct 2010 08:56:09 +0000 (08:56 +0000)
src/transport/test_quota_compliance.c

index 1942221834be363dea511753ccaafaffd66e5b7d..88e47d7d333c4e904978764d961530c486776072 100644 (file)
@@ -47,7 +47,7 @@
 #define MEASUREMENT_MSG_SIZE_BIG 32768
 #define MEASUREMENT_MAX_QUOTA 1024 * 1024 * 1024
 #define MEASUREMENT_MIN_QUOTA 1024 * 10
-#define SEND_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5)
+#define SEND_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 35)
 /**
  * Testcase timeout
  */
@@ -132,6 +132,12 @@ static unsigned long long total_bytes;
 static unsigned long long current_quota_p1;
 static unsigned long long current_quota_p2;
 
+static int is_tcp;
+static int is_tcp_nat;
+static int is_http;
+static int is_https;
+static int is_udp;
+
 static struct GNUNET_TIME_Absolute start_time;
 
 static GNUNET_SCHEDULER_TaskIdentifier die_task;
@@ -587,6 +593,26 @@ main (int argc, char *argv[])
 #ifdef MINGW
   return GNUNET_SYSERR;
 #endif
+  if (strstr(argv[0], "tcp_nat") != NULL)
+    {
+      is_tcp_nat = GNUNET_YES;
+    }
+  else if (strstr(argv[0], "tcp") != NULL)
+    {
+      is_tcp = GNUNET_YES;
+    }
+  else if (strstr(argv[0], "https") != NULL)
+    {
+      is_https = GNUNET_YES;
+    }
+  else if (strstr(argv[0], "http") != NULL)
+    {
+      is_http = GNUNET_YES;
+    }
+  else if (strstr(argv[0], "udp") != NULL)
+    {
+      is_udp = GNUNET_YES;
+    }
   GNUNET_log_setup ("test-quota-compliance",
 #if VERBOSE
                     "DEBUG",