diff options
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/fs_test_lib.c | 7 | ||||
-rw-r--r-- | src/fs/fs_test_lib.h | 3 | ||||
-rw-r--r-- | src/fs/gnunet-service-fs_cp.c | 11 | ||||
-rw-r--r-- | src/fs/test_fs_test_lib.c | 12 | ||||
-rw-r--r-- | src/fs/test_gnunet_service_fs_migration.c | 14 | ||||
-rw-r--r-- | src/fs/test_gnunet_service_fs_p2p.c | 12 |
6 files changed, 31 insertions, 28 deletions
diff --git a/src/fs/fs_test_lib.c b/src/fs/fs_test_lib.c index 40a9f6276..1c15c6f60 100644 --- a/src/fs/fs_test_lib.c +++ b/src/fs/fs_test_lib.c | |||
@@ -445,9 +445,10 @@ GNUNET_FS_TEST_daemons_connect (struct GNUNET_FS_TestDaemon *daemon1, | |||
445 | ncc = GNUNET_malloc (sizeof (struct GNUNET_FS_TEST_ConnectContext)); | 445 | ncc = GNUNET_malloc (sizeof (struct GNUNET_FS_TEST_ConnectContext)); |
446 | ncc->cont = cont; | 446 | ncc->cont = cont; |
447 | ncc->cont_cls = cont_cls; | 447 | ncc->cont_cls = cont_cls; |
448 | ncc->cc = GNUNET_TESTING_daemons_connect (daemon1->daemon, daemon2->daemon, timeout, | 448 | ncc->cc = |
449 | CONNECT_ATTEMPTS, GNUNET_YES, | 449 | GNUNET_TESTING_daemons_connect (daemon1->daemon, daemon2->daemon, timeout, |
450 | ¬ify_connection, ncc); | 450 | CONNECT_ATTEMPTS, GNUNET_YES, |
451 | ¬ify_connection, ncc); | ||
451 | return ncc; | 452 | return ncc; |
452 | } | 453 | } |
453 | 454 | ||
diff --git a/src/fs/fs_test_lib.h b/src/fs/fs_test_lib.h index 204d5b2ab..81125cafc 100644 --- a/src/fs/fs_test_lib.h +++ b/src/fs/fs_test_lib.h | |||
@@ -87,7 +87,8 @@ GNUNET_FS_TEST_daemons_connect (struct GNUNET_FS_TestDaemon *daemon1, | |||
87 | * @param cc operation to cancel | 87 | * @param cc operation to cancel |
88 | */ | 88 | */ |
89 | void | 89 | void |
90 | GNUNET_FS_TEST_daemons_connect_cancel (struct GNUNET_FS_TEST_ConnectContext *cc); | 90 | GNUNET_FS_TEST_daemons_connect_cancel (struct GNUNET_FS_TEST_ConnectContext |
91 | *cc); | ||
91 | 92 | ||
92 | 93 | ||
93 | /** | 94 | /** |
diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c index c22f8b20a..69fb75be6 100644 --- a/src/fs/gnunet-service-fs_cp.c +++ b/src/fs/gnunet-service-fs_cp.c | |||
@@ -336,11 +336,12 @@ get_latency (const struct GNUNET_TRANSPORT_ATS_Information *atsi) | |||
336 | if (ntohl (atsi->type) == GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR) | 336 | if (ntohl (atsi->type) == GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR) |
337 | { | 337 | { |
338 | static int once; | 338 | static int once; |
339 | if (! once) | 339 | |
340 | { | 340 | if (!once) |
341 | once = 1; | 341 | { |
342 | GNUNET_break (0); | 342 | once = 1; |
343 | } | 343 | GNUNET_break (0); |
344 | } | ||
344 | /* how can we not have latency data? */ | 345 | /* how can we not have latency data? */ |
345 | return GNUNET_TIME_UNIT_SECONDS; | 346 | return GNUNET_TIME_UNIT_SECONDS; |
346 | } | 347 | } |
diff --git a/src/fs/test_fs_test_lib.c b/src/fs/test_fs_test_lib.c index 1f2119259..589abb3fb 100644 --- a/src/fs/test_fs_test_lib.c +++ b/src/fs/test_fs_test_lib.c | |||
@@ -52,10 +52,10 @@ static void | |||
52 | do_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 52 | do_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
53 | { | 53 | { |
54 | if (NULL != cc) | 54 | if (NULL != cc) |
55 | { | 55 | { |
56 | GNUNET_FS_TEST_daemons_connect_cancel (cc); | 56 | GNUNET_FS_TEST_daemons_connect_cancel (cc); |
57 | cc = NULL; | 57 | cc = NULL; |
58 | } | 58 | } |
59 | if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE)) | 59 | if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE)) |
60 | { | 60 | { |
61 | GNUNET_break (0); | 61 | GNUNET_break (0); |
@@ -117,8 +117,8 @@ do_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
117 | } | 117 | } |
118 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 118 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
119 | "Daemons started, will now try to connect them\n"); | 119 | "Daemons started, will now try to connect them\n"); |
120 | cc = GNUNET_FS_TEST_daemons_connect (daemons[0], daemons[1], TIMEOUT, &do_publish, | 120 | cc = GNUNET_FS_TEST_daemons_connect (daemons[0], daemons[1], TIMEOUT, |
121 | NULL); | 121 | &do_publish, NULL); |
122 | } | 122 | } |
123 | 123 | ||
124 | 124 | ||
diff --git a/src/fs/test_gnunet_service_fs_migration.c b/src/fs/test_gnunet_service_fs_migration.c index bbf2534d2..3d6735cc4 100644 --- a/src/fs/test_gnunet_service_fs_migration.c +++ b/src/fs/test_gnunet_service_fs_migration.c | |||
@@ -59,12 +59,12 @@ do_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
59 | { | 59 | { |
60 | struct GNUNET_TIME_Relative del; | 60 | struct GNUNET_TIME_Relative del; |
61 | char *fancy; | 61 | char *fancy; |
62 | 62 | ||
63 | if (NULL != cc) | 63 | if (NULL != cc) |
64 | { | 64 | { |
65 | GNUNET_FS_TEST_daemons_connect_cancel (cc); | 65 | GNUNET_FS_TEST_daemons_connect_cancel (cc); |
66 | cc = NULL; | 66 | cc = NULL; |
67 | } | 67 | } |
68 | GNUNET_FS_TEST_daemons_stop (2, daemons); | 68 | GNUNET_FS_TEST_daemons_stop (2, daemons); |
69 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE)) | 69 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE)) |
70 | { | 70 | { |
@@ -173,8 +173,8 @@ do_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
173 | } | 173 | } |
174 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 174 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
175 | "Daemons started, will now try to connect them\n"); | 175 | "Daemons started, will now try to connect them\n"); |
176 | cc = GNUNET_FS_TEST_daemons_connect (daemons[0], daemons[1], TIMEOUT, &do_publish, | 176 | cc = GNUNET_FS_TEST_daemons_connect (daemons[0], daemons[1], TIMEOUT, |
177 | NULL); | 177 | &do_publish, NULL); |
178 | } | 178 | } |
179 | 179 | ||
180 | 180 | ||
diff --git a/src/fs/test_gnunet_service_fs_p2p.c b/src/fs/test_gnunet_service_fs_p2p.c index 26372cfa8..17b7ec181 100644 --- a/src/fs/test_gnunet_service_fs_p2p.c +++ b/src/fs/test_gnunet_service_fs_p2p.c | |||
@@ -57,10 +57,10 @@ do_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
57 | char *fancy; | 57 | char *fancy; |
58 | 58 | ||
59 | if (NULL != cc) | 59 | if (NULL != cc) |
60 | { | 60 | { |
61 | GNUNET_FS_TEST_daemons_connect_cancel (cc); | 61 | GNUNET_FS_TEST_daemons_connect_cancel (cc); |
62 | cc = NULL; | 62 | cc = NULL; |
63 | } | 63 | } |
64 | GNUNET_FS_TEST_daemons_stop (NUM_DAEMONS, daemons); | 64 | GNUNET_FS_TEST_daemons_stop (NUM_DAEMONS, daemons); |
65 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE)) | 65 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE)) |
66 | { | 66 | { |
@@ -128,8 +128,8 @@ do_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
128 | GNUNET_assert (0 != (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE)); | 128 | GNUNET_assert (0 != (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE)); |
129 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 129 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
130 | "Daemons started, will now try to connect them\n"); | 130 | "Daemons started, will now try to connect them\n"); |
131 | cc = GNUNET_FS_TEST_daemons_connect (daemons[0], daemons[1], TIMEOUT, &do_publish, | 131 | cc = GNUNET_FS_TEST_daemons_connect (daemons[0], daemons[1], TIMEOUT, |
132 | NULL); | 132 | &do_publish, NULL); |
133 | } | 133 | } |
134 | 134 | ||
135 | 135 | ||