From b43c187dc0085edb9ea98fc251cb3b3e5f479c62 Mon Sep 17 00:00:00 2001 From: "Schanzenbach, Martin" Date: Fri, 1 Feb 2019 10:50:43 +0100 Subject: [PATCH] fix #5388 --- src/gns/gnunet-gns-proxy.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c index 385524a18..e21deabde 100644 --- a/src/gns/gnunet-gns-proxy.c +++ b/src/gns/gnunet-gns-proxy.c @@ -1400,7 +1400,7 @@ curl_download_cb (void *ptr, size_t total = size * nmemb; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Receiving %ux%u bytes for `%s%s' from cURL\n", + "Receiving %ux%u bytes for `%s%s' from cURL to download\n", (unsigned int) size, (unsigned int) nmemb, s5r->domain, @@ -1408,7 +1408,13 @@ curl_download_cb (void *ptr, if (NULL == s5r->response) GNUNET_assert (GNUNET_OK == create_mhd_response_from_s5r (s5r)); - + if ( (SOCKS5_SOCKET_UPLOAD_DONE == s5r->state) && + (0 == s5r->io_len)) + { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Previous upload finished... starting DOWNLOAD.\n"); + s5r->state = SOCKS5_SOCKET_DOWNLOAD_STARTED; + } if ( (SOCKS5_SOCKET_UPLOAD_STARTED == s5r->state) || (SOCKS5_SOCKET_UPLOAD_DONE == s5r->state) ) { @@ -1473,6 +1479,13 @@ curl_upload_cb (void *buf, size_t len = size * nmemb; size_t to_copy; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Receiving %ux%u bytes for `%s%s' from cURL to upload\n", + (unsigned int) size, + (unsigned int) nmemb, + s5r->domain, + s5r->url); + if ( (0 == s5r->io_len) && (SOCKS5_SOCKET_UPLOAD_DONE != s5r->state) ) { -- 2.25.1