aboutsummaryrefslogtreecommitdiff
path: root/src/fs/test_gnunet_service_fs_p2p.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/test_gnunet_service_fs_p2p.c')
-rw-r--r--src/fs/test_gnunet_service_fs_p2p.c22
1 files changed, 20 insertions, 2 deletions
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
75do_download (void *cls, 75do_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
92do_publish (void *cls, 101do_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);