[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-twister] 04/04: Tolerate download state not set.
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-twister] 04/04: Tolerate download state not set. |
Date: |
Sun, 03 Jun 2018 21:13:30 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository twister.
commit c5a65df2f40125fdd7d35f29822038d0d93fc5b5
Author: Marcello Stanisci <address@hidden>
AuthorDate: Fri Jun 1 16:20:52 2018 +0200
Tolerate download state not set.
---
src/twister/taler-twister-service.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/twister/taler-twister-service.c
b/src/twister/taler-twister-service.c
index eb1861a..fe0e119 100644
--- a/src/twister/taler-twister-service.c
+++ b/src/twister/taler-twister-service.c
@@ -457,8 +457,17 @@ curl_download_cb (void *ptr,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Curl download proceeding\n");
- GNUNET_assert
- (REQUEST_STATE_DOWNLOAD_STARTED == hr->state);
+
+ /* This condition holds when, for example, a Web
+ * server gives the response _before_ having received
+ * all the upload data, or no upload data at all. */
+ if (REQUEST_STATE_DOWNLOAD_STARTED != hr->state)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "Download prematurely started\n");
+ hr->state = REQUEST_STATE_DOWNLOAD_STARTED;
+ }
+
if (hr->io_size - hr->io_len < total)
{
--
To stop receiving notification emails like this one, please contact
address@hidden