diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-09-14 15:57:36 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-09-14 15:57:36 +0000 |
commit | 91d27e4d260d9cf49f06a9774cd139eb5ad8d565 (patch) | |
tree | 99af3b23b1451c65203f74bb9c0d27ede64a51b5 /src | |
parent | b035fd00cb16ee7c2408c529e67edfb885ae46c1 (diff) | |
download | gnunet-91d27e4d260d9cf49f06a9774cd139eb5ad8d565.tar.gz gnunet-91d27e4d260d9cf49f06a9774cd139eb5ad8d565.zip |
-fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/fs/perf_gnunet_service_fs_p2p.c | 2 | ||||
-rw-r--r-- | src/fs/perf_gnunet_service_fs_p2p_respect.c | 2 | ||||
-rw-r--r-- | src/fs/test_gnunet_service_fs_migration.c | 18 | ||||
-rw-r--r-- | src/fs/test_gnunet_service_fs_p2p.c | 14 |
4 files changed, 27 insertions, 9 deletions
diff --git a/src/fs/perf_gnunet_service_fs_p2p.c b/src/fs/perf_gnunet_service_fs_p2p.c index a7eb5ad16..76b4a2f69 100644 --- a/src/fs/perf_gnunet_service_fs_p2p.c +++ b/src/fs/perf_gnunet_service_fs_p2p.c | |||
@@ -302,6 +302,7 @@ do_publish (void *cls, | |||
302 | int do_index; | 302 | int do_index; |
303 | int anonymity; | 303 | int anonymity; |
304 | 304 | ||
305 | GNUNET_TESTBED_operation_done (op); | ||
305 | if (NULL != emsg) | 306 | if (NULL != emsg) |
306 | { | 307 | { |
307 | GNUNET_SCHEDULER_shutdown (); | 308 | GNUNET_SCHEDULER_shutdown (); |
@@ -348,6 +349,7 @@ do_connect (void *cls, | |||
348 | int | 349 | int |
349 | main (int argc, char *argv[]) | 350 | main (int argc, char *argv[]) |
350 | { | 351 | { |
352 | progname = argv[0]; | ||
351 | GNUNET_TESTBED_test_run ("perf-gnunet-service-fs-p2p", | 353 | GNUNET_TESTBED_test_run ("perf-gnunet-service-fs-p2p", |
352 | "perf_gnunet_service_fs_p2p.conf", | 354 | "perf_gnunet_service_fs_p2p.conf", |
353 | NUM_DAEMONS, | 355 | NUM_DAEMONS, |
diff --git a/src/fs/perf_gnunet_service_fs_p2p_respect.c b/src/fs/perf_gnunet_service_fs_p2p_respect.c index 3030749e2..e2a6900ec 100644 --- a/src/fs/perf_gnunet_service_fs_p2p_respect.c +++ b/src/fs/perf_gnunet_service_fs_p2p_respect.c | |||
@@ -369,6 +369,7 @@ do_publish2 (void *cls, | |||
369 | NULL); | 369 | NULL); |
370 | } | 370 | } |
371 | 371 | ||
372 | |||
372 | static void | 373 | static void |
373 | do_publish1 (void *cls, | 374 | do_publish1 (void *cls, |
374 | struct GNUNET_TESTBED_Operation *op, | 375 | struct GNUNET_TESTBED_Operation *op, |
@@ -378,6 +379,7 @@ do_publish1 (void *cls, | |||
378 | int do_index; | 379 | int do_index; |
379 | int anonymity; | 380 | int anonymity; |
380 | 381 | ||
382 | GNUNET_TESTBED_operation_done (op); | ||
381 | if (NULL != emsg) | 383 | if (NULL != emsg) |
382 | { | 384 | { |
383 | GNUNET_SCHEDULER_shutdown (); | 385 | GNUNET_SCHEDULER_shutdown (); |
diff --git a/src/fs/test_gnunet_service_fs_migration.c b/src/fs/test_gnunet_service_fs_migration.c index f1f2084f9..550c79c4b 100644 --- a/src/fs/test_gnunet_service_fs_migration.c +++ b/src/fs/test_gnunet_service_fs_migration.c | |||
@@ -52,6 +52,8 @@ static int ok; | |||
52 | 52 | ||
53 | static struct GNUNET_TIME_Absolute start_time; | 53 | static struct GNUNET_TIME_Absolute start_time; |
54 | 54 | ||
55 | static struct GNUNET_TESTBED_Operation *op; | ||
56 | |||
55 | 57 | ||
56 | static void | 58 | static void |
57 | do_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 59 | do_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
@@ -88,6 +90,8 @@ do_download (void *cls, | |||
88 | { | 90 | { |
89 | struct GNUNET_FS_Uri *uri = cls; | 91 | struct GNUNET_FS_Uri *uri = cls; |
90 | 92 | ||
93 | GNUNET_TESTBED_operation_done (op); | ||
94 | op = NULL; | ||
91 | if (NULL != emsg) | 95 | if (NULL != emsg) |
92 | { | 96 | { |
93 | GNUNET_SCHEDULER_shutdown (); | 97 | GNUNET_SCHEDULER_shutdown (); |
@@ -112,7 +116,8 @@ stop_source_peer (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
112 | struct GNUNET_FS_Uri *uri = cls; | 116 | struct GNUNET_FS_Uri *uri = cls; |
113 | 117 | ||
114 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping source peer\n"); | 118 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping source peer\n"); |
115 | GNUNET_TESTBED_peer_stop (daemons[1], &do_download, uri); | 119 | op = GNUNET_TESTBED_peer_stop (daemons[1], &do_download, uri); |
120 | GNUNET_assert (NULL != op); | ||
116 | } | 121 | } |
117 | 122 | ||
118 | 123 | ||
@@ -137,9 +142,12 @@ do_wait (void *cls, const struct GNUNET_FS_Uri *uri) | |||
137 | 142 | ||
138 | static void | 143 | static void |
139 | do_publish (void *cls, | 144 | do_publish (void *cls, |
140 | struct GNUNET_TESTBED_Operation *op, | 145 | struct GNUNET_TESTBED_Operation *oparg, |
141 | const char *emsg) | 146 | const char *emsg) |
142 | { | 147 | { |
148 | GNUNET_assert (op == oparg); | ||
149 | GNUNET_TESTBED_operation_done (op); | ||
150 | op = NULL; | ||
143 | if (NULL != emsg) | 151 | if (NULL != emsg) |
144 | { | 152 | { |
145 | GNUNET_SCHEDULER_shutdown (); | 153 | GNUNET_SCHEDULER_shutdown (); |
@@ -168,9 +176,9 @@ do_connect (void *cls, | |||
168 | daemons[i] = peers[i]; | 176 | daemons[i] = peers[i]; |
169 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 177 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
170 | "Daemons started, will now try to connect them\n"); | 178 | "Daemons started, will now try to connect them\n"); |
171 | GNUNET_TESTBED_overlay_connect (NULL, | 179 | op = GNUNET_TESTBED_overlay_connect (NULL, |
172 | &do_publish, NULL, | 180 | &do_publish, NULL, |
173 | daemons[0], daemons[1]); | 181 | daemons[0], daemons[1]); |
174 | } | 182 | } |
175 | 183 | ||
176 | 184 | ||
diff --git a/src/fs/test_gnunet_service_fs_p2p.c b/src/fs/test_gnunet_service_fs_p2p.c index df7b9604b..218f16b01 100644 --- a/src/fs/test_gnunet_service_fs_p2p.c +++ b/src/fs/test_gnunet_service_fs_p2p.c | |||
@@ -48,6 +48,8 @@ static int ok; | |||
48 | 48 | ||
49 | static struct GNUNET_TIME_Absolute start_time; | 49 | static struct GNUNET_TIME_Absolute start_time; |
50 | 50 | ||
51 | static struct GNUNET_TESTBED_Operation *op; | ||
52 | |||
51 | 53 | ||
52 | static void | 54 | static void |
53 | do_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 55 | do_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
@@ -99,9 +101,13 @@ do_download (void *cls, const struct GNUNET_FS_Uri *uri) | |||
99 | 101 | ||
100 | static void | 102 | static void |
101 | do_publish (void *cls, | 103 | do_publish (void *cls, |
102 | struct GNUNET_TESTBED_Operation *op, | 104 | struct GNUNET_TESTBED_Operation *opret, |
103 | const char *emsg) | 105 | const char *emsg) |
104 | { | 106 | { |
107 | GNUNET_assert (op == opret); | ||
108 | GNUNET_TESTBED_operation_done (op); | ||
109 | op = NULL; | ||
110 | |||
105 | if (NULL != emsg) | 111 | if (NULL != emsg) |
106 | { | 112 | { |
107 | GNUNET_SCHEDULER_shutdown (); | 113 | GNUNET_SCHEDULER_shutdown (); |
@@ -130,9 +136,9 @@ do_connect (void *cls, | |||
130 | daemons[i] = peers[i]; | 136 | daemons[i] = peers[i]; |
131 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 137 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
132 | "Daemons started, will now try to connect them\n"); | 138 | "Daemons started, will now try to connect them\n"); |
133 | GNUNET_TESTBED_overlay_connect (NULL, | 139 | op = GNUNET_TESTBED_overlay_connect (NULL, |
134 | &do_publish, NULL, | 140 | &do_publish, NULL, |
135 | daemons[0], daemons[1]); | 141 | daemons[0], daemons[1]); |
136 | } | 142 | } |
137 | 143 | ||
138 | 144 | ||