From c793bffc39fe1445616c9d0cb071d62575dea217 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 17 Feb 2017 11:05:55 +0100 Subject: [PATCH] assertion was inverted, also probably too strict --- src/fs/fs_download.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c index a89a95907..0789162bf 100644 --- a/src/fs/fs_download.c +++ b/src/fs/fs_download.c @@ -1363,7 +1363,6 @@ do_reconnect (void *cls) static void try_reconnect (struct GNUNET_FS_DownloadContext *dc) { - if (NULL != dc->mq) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, @@ -1380,7 +1379,7 @@ try_reconnect (struct GNUNET_FS_DownloadContext *dc) "Will try to reconnect in %s\n", GNUNET_STRINGS_relative_time_to_string (dc->reconnect_backoff, GNUNET_YES)); - GNUNET_assert (NULL == dc->job_queue); + GNUNET_break (NULL != dc->job_queue); dc->task = GNUNET_SCHEDULER_add_delayed (dc->reconnect_backoff, &do_reconnect, @@ -2211,8 +2210,8 @@ GNUNET_FS_download_start_downloading_ (struct GNUNET_FS_DownloadContext *dc) GNUNET_assert (NULL == dc->job_queue); GNUNET_assert (NULL == dc->task); GNUNET_assert (NULL != dc->active); - dc->job_queue = - GNUNET_FS_queue_ (dc->h, + dc->job_queue + = GNUNET_FS_queue_ (dc->h, &activate_fs_download, &deactivate_fs_download, dc, @@ -2252,14 +2251,14 @@ GNUNET_FS_download_resume (struct GNUNET_FS_DownloadContext *dc) GNUNET_FS_download_make_status_ (&pi, dc); GNUNET_assert (NULL == dc->task); - dc->job_queue = - GNUNET_FS_queue_ (dc->h, - &activate_fs_download, - &deactivate_fs_download, - dc, (dc->length + DBLOCK_SIZE - 1) / DBLOCK_SIZE, - (0 == (dc->options & GNUNET_FS_DOWNLOAD_IS_PROBE)) - ? GNUNET_FS_QUEUE_PRIORITY_NORMAL - : GNUNET_FS_QUEUE_PRIORITY_PROBE); + dc->job_queue + = GNUNET_FS_queue_ (dc->h, + &activate_fs_download, + &deactivate_fs_download, + dc, (dc->length + DBLOCK_SIZE - 1) / DBLOCK_SIZE, + (0 == (dc->options & GNUNET_FS_DOWNLOAD_IS_PROBE)) + ? GNUNET_FS_QUEUE_PRIORITY_NORMAL + : GNUNET_FS_QUEUE_PRIORITY_PROBE); } -- 2.25.1