diff options
Diffstat (limited to 'src/topology/test_gnunet_daemon_topology.c')
-rw-r--r-- | src/topology/test_gnunet_daemon_topology.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/topology/test_gnunet_daemon_topology.c b/src/topology/test_gnunet_daemon_topology.c index f6d0e2c2b..a7dace383 100644 --- a/src/topology/test_gnunet_daemon_topology.c +++ b/src/topology/test_gnunet_daemon_topology.c | |||
@@ -98,6 +98,7 @@ shutdown_task (void *cls) | |||
98 | GNUNET_SCHEDULER_cancel (timeout_tid); | 98 | GNUNET_SCHEDULER_cancel (timeout_tid); |
99 | } | 99 | } |
100 | 100 | ||
101 | |||
101 | static void | 102 | static void |
102 | timeout_task (void *cls) | 103 | timeout_task (void *cls) |
103 | { | 104 | { |
@@ -109,6 +110,7 @@ timeout_task (void *cls) | |||
109 | GNUNET_SCHEDULER_shutdown (); | 110 | GNUNET_SCHEDULER_shutdown (); |
110 | } | 111 | } |
111 | 112 | ||
113 | |||
112 | /* | 114 | /* |
113 | * The function is called every time the topology of connected | 115 | * The function is called every time the topology of connected |
114 | * peers to a peer changes. | 116 | * peers to a peer changes. |
@@ -131,7 +133,7 @@ statistics_iterator (void *cls, | |||
131 | if (p_ctx->connections < value) | 133 | if (p_ctx->connections < value) |
132 | p_ctx->connections = value; | 134 | p_ctx->connections = value; |
133 | 135 | ||
134 | if ((THRESHOLD <= value)&&(GNUNET_NO == p_ctx->reported)) | 136 | if ((THRESHOLD <= value) && (GNUNET_NO == p_ctx->reported)) |
135 | { | 137 | { |
136 | p_ctx->reported = GNUNET_YES; | 138 | p_ctx->reported = GNUNET_YES; |
137 | checked_peers++; | 139 | checked_peers++; |
@@ -153,6 +155,7 @@ statistics_iterator (void *cls, | |||
153 | return GNUNET_YES; | 155 | return GNUNET_YES; |
154 | } | 156 | } |
155 | 157 | ||
158 | |||
156 | static void * | 159 | static void * |
157 | ca_statistics (void *cls, | 160 | ca_statistics (void *cls, |
158 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 161 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
@@ -203,6 +206,7 @@ service_connect_complete (void *cls, | |||
203 | "call to GNUNET_STATISTICS_watch() failed\n"); | 206 | "call to GNUNET_STATISTICS_watch() failed\n"); |
204 | } | 207 | } |
205 | 208 | ||
209 | |||
206 | static void | 210 | static void |
207 | notify_connect_complete (void *cls, | 211 | notify_connect_complete (void *cls, |
208 | struct GNUNET_TESTBED_Operation *op, | 212 | struct GNUNET_TESTBED_Operation *op, |
@@ -219,6 +223,7 @@ notify_connect_complete (void *cls, | |||
219 | connect_left--; | 223 | connect_left--; |
220 | } | 224 | } |
221 | 225 | ||
226 | |||
222 | static void | 227 | static void |
223 | do_connect (void *cls, | 228 | do_connect (void *cls, |
224 | struct GNUNET_TESTBED_RunHandle *h, | 229 | struct GNUNET_TESTBED_RunHandle *h, |
@@ -286,4 +291,5 @@ main (int argc, char *argv[]) | |||
286 | return (GNUNET_OK != result) ? 1 : 0; | 291 | return (GNUNET_OK != result) ? 1 : 0; |
287 | } | 292 | } |
288 | 293 | ||
294 | |||
289 | /* end of test_gnunet_daemon_topology.c */ | 295 | /* end of test_gnunet_daemon_topology.c */ |