diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-09-05 21:18:45 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-09-05 21:18:45 +0000 |
commit | 563b71afee70ac213a8bb28ce0697fcbae06aac3 (patch) | |
tree | 122d6a25630f68a9845651ba2295ef68f7d2af09 /src/fs/test_fs_test_lib.c | |
parent | cf6e2bdb1b9a5aedc4f090df853814b9df817e03 (diff) | |
download | gnunet-563b71afee70ac213a8bb28ce0697fcbae06aac3.tar.gz gnunet-563b71afee70ac213a8bb28ce0697fcbae06aac3.zip |
fixing API and clean up issues in testing
Diffstat (limited to 'src/fs/test_fs_test_lib.c')
-rw-r--r-- | src/fs/test_fs_test_lib.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/fs/test_fs_test_lib.c b/src/fs/test_fs_test_lib.c index 458d4606b..1f2119259 100644 --- a/src/fs/test_fs_test_lib.c +++ b/src/fs/test_fs_test_lib.c | |||
@@ -44,11 +44,18 @@ | |||
44 | 44 | ||
45 | static struct GNUNET_FS_TestDaemon *daemons[NUM_DAEMONS]; | 45 | static struct GNUNET_FS_TestDaemon *daemons[NUM_DAEMONS]; |
46 | 46 | ||
47 | static struct GNUNET_FS_TEST_ConnectContext *cc; | ||
48 | |||
47 | static int ret; | 49 | static int ret; |
48 | 50 | ||
49 | static void | 51 | static void |
50 | do_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 52 | do_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
51 | { | 53 | { |
54 | if (NULL != cc) | ||
55 | { | ||
56 | GNUNET_FS_TEST_daemons_connect_cancel (cc); | ||
57 | cc = NULL; | ||
58 | } | ||
52 | if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE)) | 59 | if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE)) |
53 | { | 60 | { |
54 | GNUNET_break (0); | 61 | GNUNET_break (0); |
@@ -83,6 +90,7 @@ do_download (void *cls, const struct GNUNET_FS_Uri *uri) | |||
83 | static void | 90 | static void |
84 | do_publish (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 91 | do_publish (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
85 | { | 92 | { |
93 | cc = NULL; | ||
86 | if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE)) | 94 | if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE)) |
87 | { | 95 | { |
88 | GNUNET_break (0); | 96 | GNUNET_break (0); |
@@ -109,8 +117,8 @@ do_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
109 | } | 117 | } |
110 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 118 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
111 | "Daemons started, will now try to connect them\n"); | 119 | "Daemons started, will now try to connect them\n"); |
112 | GNUNET_FS_TEST_daemons_connect (daemons[0], daemons[1], TIMEOUT, &do_publish, | 120 | cc = GNUNET_FS_TEST_daemons_connect (daemons[0], daemons[1], TIMEOUT, &do_publish, |
113 | NULL); | 121 | NULL); |
114 | } | 122 | } |
115 | 123 | ||
116 | 124 | ||