diff options
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/test_fs_namespace.c | 17 | ||||
-rw-r--r-- | src/fs/test_gnunet_service_fs_p2p.c | 22 |
2 files changed, 29 insertions, 10 deletions
diff --git a/src/fs/test_fs_namespace.c b/src/fs/test_fs_namespace.c index 48442f855..ea9e00c90 100644 --- a/src/fs/test_fs_namespace.c +++ b/src/fs/test_fs_namespace.c | |||
@@ -47,14 +47,6 @@ struct PeerContext | |||
47 | }; | 47 | }; |
48 | 48 | ||
49 | 49 | ||
50 | static void * | ||
51 | progress_cb (void *cls, | ||
52 | const struct GNUNET_FS_ProgressInfo *event) | ||
53 | { | ||
54 | return NULL; | ||
55 | } | ||
56 | |||
57 | |||
58 | static void | 50 | static void |
59 | setup_peer (struct PeerContext *p, const char *cfgname) | 51 | setup_peer (struct PeerContext *p, const char *cfgname) |
60 | { | 52 | { |
@@ -97,6 +89,15 @@ spcb (void *cls, | |||
97 | #endif | 89 | #endif |
98 | 90 | ||
99 | 91 | ||
92 | |||
93 | static void * | ||
94 | progress_cb (void *cls, | ||
95 | const struct GNUNET_FS_ProgressInfo *event) | ||
96 | { | ||
97 | return NULL; | ||
98 | } | ||
99 | |||
100 | |||
100 | static void | 101 | static void |
101 | publish_cont (void *cls, | 102 | publish_cont (void *cls, |
102 | const struct GNUNET_FS_Uri *ksk_uri, | 103 | const struct GNUNET_FS_Uri *ksk_uri, |
diff --git a/src/fs/test_gnunet_service_fs_p2p.c b/src/fs/test_gnunet_service_fs_p2p.c index 410666dea..024e08155 100644 --- a/src/fs/test_gnunet_service_fs_p2p.c +++ b/src/fs/test_gnunet_service_fs_p2p.c | |||
@@ -75,7 +75,16 @@ static void | |||
75 | do_download (void *cls, | 75 | do_download (void *cls, |
76 | const struct GNUNET_FS_Uri *uri) | 76 | const struct GNUNET_FS_Uri *uri) |
77 | { | 77 | { |
78 | GNUNET_assert (NULL != uri); | 78 | if (NULL == uri) |
79 | { | ||
80 | GNUNET_FS_TEST_daemons_stop (sched, | ||
81 | NUM_DAEMONS, | ||
82 | daemons); | ||
83 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
84 | "Timeout during upload attempt, shutting down with error\n"); | ||
85 | ok = 1; | ||
86 | return; | ||
87 | } | ||
79 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 88 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
80 | "Downloading %llu bytes\n", | 89 | "Downloading %llu bytes\n", |
81 | (unsigned long long) FILESIZE); | 90 | (unsigned long long) FILESIZE); |
@@ -92,7 +101,16 @@ static void | |||
92 | do_publish (void *cls, | 101 | do_publish (void *cls, |
93 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 102 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
94 | { | 103 | { |
95 | GNUNET_assert (0 != (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE)); | 104 | if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE)) |
105 | { | ||
106 | GNUNET_FS_TEST_daemons_stop (sched, | ||
107 | NUM_DAEMONS, | ||
108 | daemons); | ||
109 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
110 | "Timeout during connect attempt, shutting down with error\n"); | ||
111 | ok = 1; | ||
112 | return; | ||
113 | } | ||
96 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 114 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
97 | "Publishing %llu bytes\n", | 115 | "Publishing %llu bytes\n", |
98 | (unsigned long long) FILESIZE); | 116 | (unsigned long long) FILESIZE); |