[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r22090 - gnunet/src/dht
From: |
gnunet |
Subject: |
[GNUnet-SVN] r22090 - gnunet/src/dht |
Date: |
Tue, 19 Jun 2012 08:57:21 +0200 |
Author: grothoff
Date: 2012-06-19 08:57:21 +0200 (Tue, 19 Jun 2012)
New Revision: 22090
Modified:
gnunet/src/dht/test_dht_monitor.c
Log:
-fixing #2397 -- start put a bit after starting monitoring to observe all events
Modified: gnunet/src/dht/test_dht_monitor.c
===================================================================
--- gnunet/src/dht/test_dht_monitor.c 2012-06-18 23:48:08 UTC (rev 22089)
+++ gnunet/src/dht/test_dht_monitor.c 2012-06-19 06:57:21 UTC (rev 22090)
@@ -182,6 +182,7 @@
shutdown_handle = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL);
}
+
static void
dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
const struct GNUNET_HashCode * key,
@@ -229,6 +230,7 @@
disconnect_task = GNUNET_SCHEDULER_add_now (&disconnect_peers, NULL);
}
+
/**
* Start test: start GET request from the first node in the line looking for
* the ID of the last node in the line.
@@ -293,6 +295,7 @@
put_task = GNUNET_SCHEDULER_add_delayed (PUT_FREQUENCY, &put_id, NULL);
}
+
/**
* Callback called on each GET request going through the DHT.
* Prints the info about the intercepted packet and increments a counter.
@@ -306,7 +309,7 @@
* @param desired_replication_level Desired replication level.
* @param key Key of the requested data.
*/
-void
+static void
monitor_get_cb (void *cls,
enum GNUNET_DHT_RouteOption options,
enum GNUNET_BLOCK_Type type,
@@ -346,7 +349,7 @@
* @param data Pointer to the data carried.
* @param size Number of bytes in data.
*/
-void
+static void
monitor_put_cb (void *cls,
enum GNUNET_DHT_RouteOption options,
enum GNUNET_BLOCK_Type type,
@@ -389,7 +392,7 @@
* @param data Pointer to the result data.
* @param size Number of bytes in data.
*/
-void
+static void
monitor_res_cb (void *cls,
enum GNUNET_BLOCK_Type type,
const struct GNUNET_PeerIdentity *get_path,
@@ -481,10 +484,11 @@
return;
}
monitor_counter = 0;
- put_task = GNUNET_SCHEDULER_add_now (&put_id, NULL);
+ put_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
+ &put_id, NULL);
test_task =
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
- (GNUNET_TIME_UNIT_SECONDS, 2), &do_test,
+ (GNUNET_TIME_UNIT_SECONDS, 3), &do_test,
NULL);
disconnect_task =
GNUNET_SCHEDULER_add_delayed (GET_TIMEOUT, &disconnect_peers, NULL);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r22090 - gnunet/src/dht,
gnunet <=